Skip to content
Snippets Groups Projects

Resolve "Send emails for celery tasks with status "FAILURE""

All threads resolved!
Files
3
{% load i18n %}
{% block subject %}
{% blocktrans with task_name=task_name%} Celery task {{ task_name }} failed!{% endblocktrans %}
{% endblock %}
{% block plain %}
{% trans "Hello," %}
{% blocktrans with task_name=task_name %}
the celery task {{ task_name }} failed with following information:
{% endblocktrans %}
{% blocktrans with task_name=task_name task=task task_id=task_id exception=exception args=args kwargs=kwargs traceback=traceback %}
* Task name: {{task_name}}
* Task: {{task}}
* Id of the task: {{task_id}}
* Exception instance raised: {{ exception }}
* Positional arguments the task was called with: {{ args }}
* Keyword arguments the task was called with: {{ kwargs }}
* Stack trace object: {{ traceback }}
{% endblocktrans %}
{% endblock %}
{% block html %}
<p>{% trans "Hello," %}</p>
<p>
{% blocktrans with task_name=task_name %}
the celery task {{ task_name }} failed with following information:
{% endblocktrans %}
</p>
<ul>
{% blocktrans with task_name=task_name task=task task_id=task_id exception=exception args=args kwargs=kwargs traceback=traceback %}
<li>Task name: {{task_name}}</li>
<li>Task: {{task}}</li>
<li>Id of the task: {{task_id}}</li>
<li>Exception instance raised: {{ exception }}</li>
<li>Positional arguments the task was called with: {{ args }}</li>
<li>Keyword arguments the task was called with: {{ kwargs }}</li>
<li>Stack trace object: {{ traceback }}</li>
</ul>
{% endblocktrans %}
{% endblock %}
Loading