{% extends "base.html" %} {% block title %}Jobs · {{ site_title }}{% endblock %} {% block heading %}Jobs{% endblock %} {% set level = { 'succeeded': 'success', 'failed': 'danger', 'running': 'info', 'queued': 'warning', 'cancelled': 'neutral' } %} {% block content %}
{% if handlers %}
{{ handlers|length }} handler{{ '' if handlers|length == 1 else 's' }} registered:
{% for name in handlers %}{{ name }}{{ ', ' if not loop.last }}{% endfor %}
{% else %}
No handlers registered. Decorate an async function with @job().
{% endif %}
| # | Name | Status | Attempts | Created | Finished | Actions |
|---|---|---|---|---|---|---|
| {{ job.id }} | {{ job.name }} |
{{ job.status.value }}
{% if job.error %}
{{ job.error }} {% endif %} |
{{ job.attempts }}/{{ job.max_attempts }} | {{ job.created_at.strftime("%d %b %H:%M") }} | {{ job.finished_at.strftime("%d %b %H:%M") if job.finished_at else '—' }} | {% if job.status.value in ('failed', 'cancelled') %} {% elif job.status.value == 'queued' %} {% endif %} |
Queue one with await enqueue(my_job, arg=1).