Merge pull request #158 from NebulousLabs/fix-bots-2

Clean up message and increase threshold in funds-checker.py
This commit is contained in:
Marcin Jachymiak 2020-04-14 18:31:33 -04:00 committed by GitHub
commit d729e53e25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -60,9 +60,9 @@ async def check_health():
return
# Alert devs when only a fraction of the allowance is remaining.
UNALLOC_THRESHOLD = 0.2
if allocated_funds >= UNALLOC_THRESHOLD * allowance_funds :
await send_msg(client, "{} of allowance spent: \n{}".format(UNALLOC_THRESHOLD, alloc_msg), force_notify=True)
SPEND_THRESHOLD = 0.8
if allocated_funds >= SPEND_THRESHOLD * allowance_funds :
await send_msg(client, "More than {:.0%} of allowance spent: \n{}".format(SPEND_THRESHOLD, alloc_msg), force_notify=True)
return
# Send an informational heartbeat if all checks passed.