简体   繁体   中英

Celery, find the task caller from the task?

Is it possible to lookup what code called (delay(), apply_async(), apply(), etc.) a task from within the task's code? Strings would be fine. Ideally, I would like to get the caller's stack trace.

Short answer is no and that is by design.

Long answer is yes, you can always send in unneeded information to the worker whose sole purpose is to identify the caller and the caller's state.

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