backend/press_release_nl/utils/celery.py

11 lines
250 B
Python
Raw Normal View History

2023-09-09 14:13:08 +03:00
from config.celery_app import app
def get_scheduled_tasks_name() -> [str]:
i = app.control.inspect()
t = i.active()
all_tasks = []
for worker, tasks in t.items():
all_tasks += tasks
return [x["name"] for x in all_tasks]