{% extends "base.html" %} {% from "macros.html" import icon %} {% block title %}{{ t('Background Jobs & DLQ') }}{% endblock %} {% block content %} {# Queue Metric Cards #}
{{ t('High Priority') }} {{ counts.high }}
{{ t('Default Queue') }} {{ counts.default }}
{{ t('Low Priority') }} {{ counts.low }}
{{ t('Delayed Tasks') }} {{ counts.delayed }}
0 %}style="border-color: rgba(220, 38, 38, 0.4); background: var(--danger-pale);"{% endif %}> 0 %}style="color: var(--danger-fg);"{% endif %}>{{ t('Dead Letter Queue') }} 0 %}style="color: var(--danger);"{% endif %}> {{ counts.dlq }}

{{ icon('alert-triangle', 16) }} {{ t('Failed Tasks (Dead Letter Queue)') }}

{{ jobs|length }} {{ t('items listed') }}
{% if jobs %}
{% for j in jobs %} {% endfor %}
{{ t('Job / Function') }} {{ t('Queue') }} {{ t('Retries') }} {{ t('Failed at') }} {{ t('Error Message') }}
{{ j.module | e }}.{{ j.function | e }}
#{{ j.id | e }}
{{ j.queue or 'default' }} {{ j.retry_count or 0 }} / {{ j.retries or 0 }} {{ j.failed_at_fmt }}
{{ (j.error or t('Execution failed')) | e }}
{{ request.csrf_input() }}
{{ request.csrf_input() }}
{% else %}
{{ icon('check-circle', 48) }}

{{ t('No failed jobs') }}

{{ t('The Dead Letter Queue is currently empty. All background workers are healthy.') }}

{% endif %}
{% endblock %}