mirror of
https://github.com/openziti/zrok.git
synced 2025-08-14 10:08:26 +02:00
new bandwidth class interface to facilitate operating on global and class-based bandwidth limits in the same code, easily (#606)
This commit is contained in:
@ -98,16 +98,6 @@ func (a *Agent) CanCreateShare(acctId, envId int, reserved, uniqueName bool, _ s
|
||||
return false, err
|
||||
}
|
||||
|
||||
alc, err := a.str.FindLimitClassesForAccount(acctId, trx)
|
||||
if err != nil {
|
||||
logrus.Errorf("error finding limit classes for account with id '%d': %v", acctId, err)
|
||||
return false, err
|
||||
}
|
||||
sortLimitClasses(alc)
|
||||
if len(alc) > 0 {
|
||||
logrus.Infof("selected limit class: %v", alc[0])
|
||||
}
|
||||
|
||||
if a.cfg.Shares > Unlimited || (reserved && a.cfg.ReservedShares > Unlimited) || (reserved && uniqueName && a.cfg.UniqueNames > Unlimited) {
|
||||
envs, err := a.str.FindEnvironmentsForAccount(acctId, trx)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user