{% extends 'layouts/base.html' %} {% load formats file_extension info_value %} {% block title %} Tables {% endblock title %} {% block extrastyle %} {% endblock extrastyle %} {% block content %}
Async Tasks Manager
{% if scripts %}

Superusers are able to create/cancel tasks.
Ordinary users can only view execution logs and running tasks (no other interactions allowed).

{% else %}

No scripts detected - Please update the configuration (CELERY_SCRIPTS_DIR, CELERY_LOGS_DIR)

{% endif %}
Tasks List
{% if request.user.is_authenticated %} {% endif %} {% for task in tasks %} {% if task.status == "STARTED" %} {% else %} {% endif %} {% csrf_token %} {% if request.user.is_authenticated %} {% endif %} {% endfor %}
Name Script STATE Script ARGS Action
{{task.name}}

Celery Task

{{ task.script }}

Latest status: {{ task.status }}
{% if task.status == "STARTED" %} RUNNING {% elif task.status == "FAILURE" %} FINISHED {% elif task.status == "REVOKED" %} CANCELLED {% else %} FINISHED {% endif %} {% if task.name == 'execute_script' %} {% else %} NA {% endif %} {% if task.status == "STARTED" %} {% elif task.status == "FAILURE" or task.status == "REVOKED" %} {% else %} {% endif %}
LOGS
{% for result in task_results %} {% endfor %}
Task Input Status Start TS End TS Output Logs
{{result.id}} - {{result.task_name}}

{{result.task_id}}

{{result|get_result_field:"input"}}

{% if result|get_result_field:"status" %} {{result|get_result_field:"status"}} {% else %} RUNNING {% endif %}

{{result.date_created|date_format}}

{{result.date_done|date_format}}

{{result|get_result_field:"output"}}

View LOG

{% endblock content %} {% block extra_js %} {% endblock extra_js %}