From 95fb2da1964d0a9056e8e13b236786b7d8f77caa Mon Sep 17 00:00:00 2001 From: jirik Date: Mon, 23 Dec 2019 15:44:31 +0100 Subject: [PATCH] Fix PENDING in state after celery task is removed from redis --- src/layman/celery.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layman/celery.py b/src/layman/celery.py index 8b57686e5..1cb12e013 100644 --- a/src/layman/celery.py +++ b/src/layman/celery.py @@ -224,7 +224,7 @@ def abort_task_chain__deprecated(results_by_order, results_by_name=None): def is_task_successful(task_info): - return task_info['last'].successful() + return task_info['last'].successful() or task_info['finished'] is True def is_task_failed(task_info): @@ -232,7 +232,7 @@ def is_task_failed(task_info): def is_task_ready(task_info): - return is_task_successful(task_info) or is_task_failed(task_info) or task_info['finished'] is True + return is_task_successful(task_info) or is_task_failed(task_info) def _get_publication_hash(username, publication_type, publication_name):