inflow share details (#606)

This commit is contained in:
Michael Quigley 2024-05-31 16:06:42 -04:00
parent 22002477be
commit 6256055a99
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -227,6 +227,12 @@ func (a *Agent) enforce(u *metrics.Usage) error {
return nil return nil
} }
shr, err := a.str.FindShareWithToken(u.ShareToken, trx)
if err != nil {
return err
}
logrus.Infof("share: '%v', shareMode: '%v', backendMode: '%v'", shr.Token, shr.ShareMode, shr.BackendMode)
if enforce, warning, rxBytes, txBytes, err := a.checkBandwidthLimit(u.AccountId); err == nil { if enforce, warning, rxBytes, txBytes, err := a.checkBandwidthLimit(u.AccountId); err == nil {
if enforce { if enforce {
enforced := false enforced := false