make backoff setting configurable
dreamfall/clacksme/pipeline/head This commit looks good Details

This commit is contained in:
Morgan McMillian 2023-01-14 07:28:40 -08:00
parent 8412effa6d
commit b7e016ed1b
1 changed files with 8 additions and 1 deletions

View File

@ -84,7 +84,14 @@ class MailboxNotifier(object):
"event_id": uid})
if self.last_check is not None:
delta = now - self.last_check
if delta.seconds > 60:
try:
backoff = System.get(System.key == "backoff")
except System.DoesNotExist:
backoff = System(key="backoff", value="60")
backoff.save()
if delta.seconds > int(backoff.value):
notify = True
else:
notify = True