add attempt_count to task

This commit is contained in:
Tim O'Meara
2020-08-11 10:16:31 -05:00
parent 07d0a8c0d1
commit 3c3395f24b
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -164,6 +164,9 @@ class Conf:
# Optional error reporting setup
ERROR_REPORTER = conf.get("error_reporter", {})
# Optional attempt count. set to 0 for infinite attempts
ATTEMPT_COUNT = conf.get('attempt_count', 0)
# OSX doesn't implement qsize because of missing sem_getvalue()
try:
QSIZE = Queue().qsize() == 0