Skip to content
Snippets Groups Projects
Verified Commit ed746501 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix celery failure email

parent 6139fa7b
No related branches found
No related tags found
1 merge request!874Resolve "Provide base templates for e-mails generated by apps"
import os
from traceback import format_exception
from django.conf import settings
......@@ -17,7 +18,7 @@ app.autodiscover_tasks()
@task_failure.connect
def task_failure_notifier(
sender=None, task_id=None, exception=None, args=None, traceback=None, **kwargs
sender=None, task_id=None, exception=None, args=None, kwargs=None, traceback=None, **__
):
recipient_list = [e[1] for e in settings.ADMINS]
send_email(
......@@ -29,8 +30,8 @@ def task_failure_notifier(
"task": str(sender),
"task_id": str(task_id),
"exception": str(exception),
"args": str(args),
"kwargs": str(kwargs),
"traceback": str(traceback),
"args": args,
"kwargs": kwargs,
"traceback": "".join(format_exception(type(exception), exception, traceback)),
},
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment