{% from "macros.html" import bar_color, icon, job_chip, empty_state with context %} {% if job %}
{% if job.queue %}
queue
{{ job.queue }}
{% endif %} {% if job.processed_on %}
processed
{{ job.processed_on|clockms }}
{% endif %} {% if job.processed_on and job.finished_on %}
duration
{{ (job.finished_on - job.processed_on)|dur }}
{% endif %} {% if job.finished_on %}
finished
{{ job.finished_on|clockms }}
{% endif %} {% if job.progress is not none %}
progress
{% if job.progress is number %}
{{ job.progress }}%
{% else %} {{ job.progress|tojson }} {% endif %}
{% endif %} {% if job.parent_id %} {# A flow child: one hop up to the parent that's waiting on it. #}
{{ icon('flow', 'w-3.5 h-3.5') }} flow
part of {{ job_chip(job.queue or name, job.parent_id) }}
{% endif %} {% if job.flow %}{% include "partials/flow_section.html" %}{% endif %}
data
{{ job.data|pretty }}
opts
{{ job.opts|pretty }}
{% if job.returnvalue is not none %}
result
{{ job.returnvalue|pretty }}
{% endif %} {% if job.logs %}
logs
{% for line in job.logs %}
{{ line }}
{% endfor %}
{% endif %} {% if job.failed_reason %}
error
{{ job.failed_reason }}
{% endif %} {% if job.stacktrace and show_stacktraces|default(true) %}
stack trace
{{ job.stacktrace }}
{% endif %}
{% else %} {{ empty_state('inbox', 'Job not found') }} {% endif %}