celery.signals.rst 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ========================================
  2. Signals - celery.signals
  3. ========================================
  4. .. data:: task_sent
  5. Triggered when a task has been sent to the broker.
  6. Note that this is executed in the client process, the one sending
  7. the task, not in the worker.
  8. Provides arguments:
  9. * task_id
  10. Id of the task to be executed.
  11. * task
  12. The task being executed.
  13. * args
  14. the tasks positional arguments.
  15. * kwargs
  16. The tasks keyword arguments.
  17. * eta
  18. The time to execute the task.
  19. * taskset
  20. Id of the taskset this task is part of (if any).
  21. .. data:: task_prerun
  22. Triggered before a task is executed.
  23. Provides arguments:
  24. * task_id
  25. Id of the task to be executed.
  26. * task
  27. The task being executed.
  28. * args
  29. the tasks positional arguments.
  30. * kwargs
  31. The tasks keyword arguments.
  32. .. data:: task_postrun
  33. Triggered after a task has been executed.
  34. Provides arguments:
  35. * task_id
  36. Id of the task to be executed.
  37. * task
  38. The task being executed.
  39. * args
  40. The tasks positional arguments.
  41. * kwargs
  42. The tasks keyword arguments.
  43. * retval
  44. The return value of the task.
  45. .. data:: worker_init
  46. Triggered before the worker is started.
  47. .. data:: worker_ready
  48. Triggered when the worker is ready to accept work.
  49. .. data:: worker_shutdown
  50. Triggered when the worker is about to shut down.