Search code examples
celeryflower

How to configure Celery to send email alerts when tasks fail?


How is it possible to configure celery to send email alerts when tasks are failing?

For example I want Celery to notify me when more than 3 tasks fail or more than 10 tasks are being retried.

Is it possible using celery or a utility (e.g. flower) or I have to write my own plugin?


Solution

  • Yes, all you need to do is set CELERY_SEND_TASK_ERROR_EMAILS = True and if Celery process fails django will send message with traceback to all emails set in ADMINS settings.