{% extends "base.html" %} {% block title %}Tasks - PyRunner{% endblock %} {% block content %}
{% include "cpanel/_sidebar.html" %}

Task Queue

Monitor and manage Django-Q2 tasks

Queued

{{ stats.queued_count }}

Running

{{ stats.running_count }}

Completed (24h)

{{ stats.completed_today }}

Failed (24h)

{{ stats.failed_today }}

{% if stuck_tasks %}

{{ stuck_tasks|length }} Stuck Task(s) Detected

Tasks have been waiting longer than expected. Workers may not be running.

{% for task in stuck_tasks %}
{{ task.id|truncatechars:20 }} Stuck for {{ task.stuck_minutes }} minutes {% if task.linked_run %} {{ task.linked_run.script.name }} {% endif %}
{% endfor %}
{% endif %}
{% if status_filter %} Clear {% endif %}
{% if queued_tasks %}

Queued Tasks ({{ queued_tasks|length }})

{% for task in queued_tasks %} {% endfor %}
Task ID Type Queued Linked Resource Actions
{{ task.id|truncatechars:24 }} {% if task.type == 'script_run' %}Script Run{% else %}System{% endif %} {{ task.queued_at|timesince }} ago {% if task.linked_run %} {{ task.linked_run.script.name }} {% else %} - {% endif %}
{% endif %}

Task History

Showing {{ completed_tasks|length }} of {{ total_completed }} tasks

{% if completed_tasks %}
{% for task in completed_tasks %} {% endfor %}
Task Name Type Status Duration Started Linked Resource
{{ task.name|truncatechars:30 }} {% if task.type == 'script_run' %}Script Run{% else %}System{% endif %} {% if task.success %} Success {% else %} Failed {% endif %} {{ task.duration_display }} {{ task.started|date:"M d, H:i" }} {% if task.linked_run %} {{ task.linked_run.script.name }} {% else %} - {% endif %}
{% if total_pages > 1 %}
{% if page > 1 %} Previous {% endif %} Page {{ page }} of {{ total_pages }} {% if page < total_pages %} Next {% endif %}
{% endif %} {% else %}

No tasks found

{% if status_filter %} Try adjusting your filters or clear all filters. {% else %} No tasks have been executed yet. {% endif %}

{% endif %}
{% endblock %}