Merge pull request #298 from Balletie/master

Add option for acknowledging failed tasks (globally and per-task)
This commit is contained in:
Ilan Steemers
2018-03-13 15:24:31 +01:00
committed by GitHub
7 changed files with 82 additions and 8 deletions
+5 -5
View File
@@ -324,12 +324,12 @@ def monitor(result_queue, broker=None):
save_cached(task, broker)
else:
save_task(task, broker)
# acknowledge and log the result
# acknowledge result
ack_id = task.pop('ack_id', False)
if ack_id and (task['success'] or task.get('ack_failure', False)):
broker.acknowledge(ack_id)
# log the result
if task['success']:
# acknowledge
ack_id = task.pop('ack_id', False)
if ack_id:
broker.acknowledge(ack_id)
# log success
logger.info(_("Processed [{}]").format(task['name']))
else: