How can I get the task_id value for a task from a task? Here is my code:
from celery.decorators import task from django.core.cache import cache @task def do_job(path): "Performs an operation on a file"
The idea is that when I create a new instance of the task, I retrieve the task_id from the task object. Then I use the task ID to determine if the task has completed. I do not want to track the task with the path value, because the file is "cleaned up" after the task is completed and may or may not exist.
In the above example, how would I get the value of current_task_id ?
python django celery
mattbasta Jul 21 '10 at 18:02 2010-07-21 18:02
source share