Celery task display name -
i have celery tasks , i'm checking states periodically separate process instantiating asyncresult using task id.
from this, task state. implementing custom results backend , extended asyncresult class described here, i'm able task name too. however, want able custom display name each task - human readable can display state info in user friendly way.
hypothetically, might set like:
@app.task() def my_task(args): display_name = "my task" ... ...
then later do...
result = extendedasyncresult(task_id) result.display_name
but looking @ custom results backend linked to, there doesn't appear way access local variables of task.
is there way achieve i'm looking for?
celery support task name - hope looking for:
@app.task(name='my task') def my_task(args): ... ...
the my task
appear wherever want (in flower example).
Comments
Post a Comment