{% from "leeuwenhoek/_macros.html" import duration, time_ago, json_tree, retry_button, retry_of_link with context %} {% macro status(s) -%} {%- set cls = {'finished': 'is-success', 'failed': 'is-danger', 'queued': 'is-info', 'deferred': 'is-warning', 'scheduled': 'is-warning'}.get(s, '') -%} {{ s }} {%- endmacro %} {% macro head() %}
{{ e.content.function }}{{ e.content.function }} {{ status(e.content.status) }}{% if e.content.event == 'perform' %} {{ duration(e.content.duration_ms) }}{% endif %}{% endmacro %}
{% macro detail(e) %}
{% set c = e.content %}
Function
{{ c.function }}
Queue
{{ c.queue }}
Status
{{ status(c.status) }}
Duration
{{ c.duration_ms | lw_duration }}
Job {{ c.job_id }}
· {{ 'Dispatch and executions' if e.content.event == 'perform' else 'Executions' }} of this job
{%- if e.parent_batch_id %} · Enqueued by batch {{ e.parent_batch_id[:8] }}{% endif %}
{{- retry_of_link(e) }}
Some arguments were redacted or truncated.
{% endif %} {% endmacro %}