Skip to content

Commit

Permalink
Merge pull request #1931 from slntopp/adjust-sus-routine
Browse files Browse the repository at this point in the history
adjust suspend routine
  • Loading branch information
coddmeistr authored Dec 12, 2024
2 parents 86537d2 + fdcd55d commit b5b5fc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/billing/routines.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ LET global = (
FOR acc IN candidates
FILTER now_matching
FILTER conf.is_enabled
FILTER acc.balance < conf['limit']
FILTER (acc.balance - acc.suspend_conf['limit']) < 0
FILTER TO_NUMBER(acc.balance) < TO_NUMBER(conf['limit'])
FILTER acc.suspend_conf.limit && (TO_NUMBER(acc.balance) - TO_NUMBER(acc.suspend_conf['limit'])) < 0
RETURN acc
)
Expand All @@ -278,7 +278,7 @@ LET extra = (
LET local = (
FOR acc IN candidates
FILTER now_matching
FILTER acc.balance < acc.suspend_conf['limit']
FILTER acc.suspend_conf.limit && acc.balance < acc.suspend_conf['limit']
RETURN acc
)
Expand Down

0 comments on commit b5b5fc1

Please sign in to comment.