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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -