{% extends "_base.html" %} {% set active_page = "job_detail" %} {% from "_partials/job_card.html" import status_badge, duration_fmt %} {% block title %}Job {{ job.id }} — TaskQ Admin{% endblock %} {% block content %}
{# Header #}

{{ job.id[:8] }}... {% if is_archived %} Archived {% endif %}

{{ job.actor }} · {{ job.queue }} · {{ status_badge(job.status) }}
{% if job.status not in terminal_statuses %}
{% endif %} {% if job.status in ("failed", "crashed", "cancelled") and not is_archived %}
{% endif %}
{# Job Card #}
ID
{{ job.id }}
Status
{{ status_badge(job.status) }}
Queue
{{ job.queue }}
Actor
{{ job.actor }}
Priority
{{ job.priority }}
Attempt
{{ job.attempt }} / {{ job.max_attempts }}
Scheduled
{{ job.scheduled_at }}
Started
{{ job.started_at or '—' }}
Finished
{{ job.finished_at or '—' }}
{% if is_archived %}
Archived
{{ archived_at.isoformat() if archived_at else '—' }}
{% endif %}
{# Job State #}

Job State

Retry Kind
{{ job.retry_kind or '—' }}
{% if job.schedule_to_close is not none %}
Schedule To Close
{{ job.schedule_to_close }}
{% endif %} {% if job.start_to_close is not none %}
Start To Close
{{ job.start_to_close }}
{% endif %} {% if job.identity_key %}
Identity Key
{{ job.identity_key }}
{% endif %} {% if job.idempotency_key %}
Idempotency Key
{{ job.idempotency_key }}
{% endif %} {% if job.fairness_key %}
Fairness Key
{{ job.fairness_key }}
{% endif %}
Tags
{% if job.tags %}
{% for tag in job.tags %} {{ tag }} {% endfor %}
{% else %} {% endif %}
{% if job.locked_by_worker %}
Locked By Worker
{{ job.locked_by_worker }}
{% endif %} {% if job.lock_expires_at %}
Lock Expires At
{{ job.lock_expires_at }}
{% endif %} {% if job.cancel_requested_at %}
Cancel Requested
{{ job.cancel_requested_at }}
Cancel Phase
{{ job.cancel_phase }}
{% endif %}
Trace ID
{{ job.trace_id or '—' }}
{% if job.span_id %}
Span ID
{{ job.span_id }}
{% endif %} {% if job.result_size_bytes is not none %}
Result Size
{{ job.result_size_bytes }} bytes
{% endif %}
{% if job.error_class or job.error_message %}
Error
{{ job.error_class }}: {{ job.error_message }}
{% if job.error_traceback %}
Traceback
{{ job.error_traceback or '—' }}
{% endif %}
{% endif %}
{# Payload / Metadata / Result #}

Data

Payload

{{ job.payload or '—' }}

Metadata

{{ job.metadata or '—' }}
{% if job.result is not none %}

Result

{{ job.result }}
{% endif %}
{# Batch info #} {% if job.metadata is mapping and job.metadata.get("batch_id") is not none %}

Batch

Batch ID
{{ job.metadata.get("batch_id") }}
{% if job.metadata.get("role") is not none %}
Role
{{ job.metadata.get("role") }}
{% endif %}
{% endif %} {# Progress #}

Progress

{% set ps = job.progress_state or {} %} {% if ps is mapping and ps.get('step') is not none %}
{% if ps.get('percent') is not none %}
{{ ps.percent }}%
{% endif %}
{{ ps.step }} {% if ps.detail %}{{ ps.detail }}{% endif %} {% if ps.ts %}{{ ps.ts }}{% endif %}
{% if ps.data is not none %}
data
{{ ps.data }}
{% endif %}
{% else %}

No progress recorded.

{% endif %}
{% if (realtime_mode | default("polling")) in ("realtime", "polling-degraded") %} {% endif %} {# Attempt History #}

Attempt History

{% if attempts %}
{% for a in attempts %} {% endfor %}
# Started Finished Outcome Duration Worker Error
{{ a.attempt }} {{ a.started_at }} {{ a.finished_at }} {{ status_badge(a.outcome) }} {% if a.duration_ms is not none %}{{ duration_fmt(a.duration_ms) }}{% else %}—{% endif %} {{ a.worker_id or '—' }} {% if a.error_message %}{{ a.error_class }}: {{ a.error_message }}{% else %}—{% endif %} {% if a.error_traceback %}
traceback
{{ a.error_traceback }}
{% endif %}
{% else %}

No attempts recorded.

{% endif %}
{# Event Log #}

Event Log

{% if events %}
{% for e in events %} {% endfor %}
Time Kind Detail
{{ e.occurred_at }} {{ e.kind }}
{{ e.detail }}
{% else %}

No events recorded.

{% endif %}
{% endblock %}