working out the hitches in the limit journals (#273)

This commit is contained in:
Michael Quigley
2023-03-22 13:09:21 -04:00
committed by Kenneth Bingham
parent 98c221304e
commit aa19fd408c
4 changed files with 73 additions and 12 deletions

View File

@ -114,6 +114,12 @@ func (a *Agent) enforce(u *metrics.Usage) error {
if enforce, warning, err := a.checkAccountLimits(u, trx); err == nil {
if enforce {
logrus.Warn("enforcing account limit")
alje, err := a.str.FindLatestAccountLimitJournal(int(u.AccountId), trx)
if err != nil {
return err
}
} else if warning {
logrus.Warn("reporting account warning")
} else {