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

This commit is contained in:
Michael Quigley
2023-03-22 13:09:21 -04:00
parent d0dd04a141
commit b103195f88
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 {