Skip to content
Snippets Groups Projects
Commit 7909b6d3 authored by Benedict Suska's avatar Benedict Suska
Browse files

Add mail template for failed celery tasks

parent 727cfc79
No related branches found
No related tags found
1 merge request!877Resolve "Send emails for celery tasks with status "FAILURE""
{% 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 %}
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