make backoff setting configurable
All checks were successful
dreamfall/clacksme/pipeline/head This commit looks good
All checks were successful
dreamfall/clacksme/pipeline/head This commit looks good
This commit is contained in:
parent
8412effa6d
commit
b7e016ed1b
1 changed files with 8 additions and 1 deletions
|
@ -84,7 +84,14 @@ class MailboxNotifier(object):
|
||||||
"event_id": uid})
|
"event_id": uid})
|
||||||
if self.last_check is not None:
|
if self.last_check is not None:
|
||||||
delta = now - self.last_check
|
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
|
notify = True
|
||||||
else:
|
else:
|
||||||
notify = True
|
notify = True
|
||||||
|
|
Loading…
Reference in a new issue