exception raised if guard_cycle configured not in range (0, 60)

This commit is contained in:
Vladimir Rychkov
2016-07-13 09:44:26 +01:00
parent 1a1385dfba
commit cadbc9f220
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -73,6 +73,8 @@ class Conf(object):
# Guard loop sleep in seconds
GUARD_CYCLE = conf.get('guard_cycle', 0.5)
if GUARD_CYCLE <= 0 or GUARD_CYCLE >= 60:
raise ValueError('`guard_cycle` must be greater than 0 and less than 60 sec')
# Disable the scheduler
SCHEDULER = conf.get('scheduler', True)
+1 -1
View File
@@ -81,7 +81,7 @@ Limits the amount of successful tasks saved to Django.
guard_cycle
~~~~~~~~~~~
Guard loop sleep in seconds
Guard loop sleep in seconds, must be greater than 0 and less than 60.
.. _sync: