简体   繁体   中英

Getting parameters of a failed django-celery task

Is it possible to get the arguments used to call a particular failed celery task given the task's ID? I am using MongoDB as the broker and using the django-celery package.

I know that you can get the result pretty easily but wanted to know if you can do the same with the arguments used to call that task.

Thanks

I managed to solve this problem by implementing a custom on_failure handler for my task as specified here:

http://docs.celeryproject.org/en/latest/userguide/tasks.html#handlers

I got the args info along with the error and saved it to a database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM