{#- Scheduling on the project and packet pages (docs/scheduler.md §9). Each form posts to one control (sched/control.py). -#} {% macro select(name, opts, cur, blank) -%} {%- endmacro %} {% macro packet_panel(e, wpid, sch, classes) -%} {% set base = "/p/" ~ (e.name|urlencode) ~ "/" ~ wpid %}
{{ sch.cls }}
{{ "its own class" if sch.cls_from == "packet" else "the project's class" if sch.cls_from == "project" else "the default class" }}
· size {{ sch.size }}
{% if sch.next %}· runs next{% endif %}
{% if sch.job %}· job {{ sch.job.id }} {{ sch.job.state|lower }}{% endif %}
{% if sch.row.waiting %}Waiting on: {{ sch.row.why }}{% if sch.row.clears_at %} (until {{ sch.row.clears_at }}){% endif %}{% else %}Starts next{% endif %} · #{{ sch.row.pos }} in the queue
{% endif %}{{ sch.cls }} {% if sch.size %}· size {{ sch.size }}{% endif %} · {{ sch.cores }} core{{ "s" if sch.cores != 1 }} in use{% if sch.jobs %}, {{ sch.jobs|length }} job{{ "s" if sch.jobs|length != 1 }}{% endif %} · {{ sch.queue|length }} due{% if sch.queue|selectattr("waiting")|list %}, {{ sch.queue|selectattr("waiting")|list|length }} waiting{% endif %}
{% if sch.hold %}On hold{% if sch.hold_by %} by {{ sch.hold_by }}{% endif %}{% if sch.hold_at %} at {{ sch.hold_at }}{% endif %}{% if sch.hold_reason %}: {{ sch.hold_reason }}{% endif %}. Nothing new starts here; packets keep their state.
{% endif %}{{ r.wpid[:8] }} | {{ r['class'] }} | {{ r.size }} | {{ r.why }} |