handling celery tasks without any arguments
This commit is contained in:
parent
07a9c56fb8
commit
4d728738ee
|
@ -65,6 +65,9 @@ celery = make_celery(flask_app)
|
|||
def is_task_active(fun, task_id, args):
|
||||
from celery.task.control import inspect
|
||||
|
||||
if not args:
|
||||
args = '()' # empty args
|
||||
|
||||
i = inspect()
|
||||
active_tasks = i.active()
|
||||
for _, tasks in active_tasks.items():
|
||||
|
|
Loading…
Reference in New Issue