{% extends "base.html" %} {% import "_side.html" as sidem with context %} {% import "_panels.html" as xpm %} {% block title %}Scheduler{% endblock %} {% block crumbs %}/ scheduler{% endblock %} {% block head %} {% endblock %} {% block main %}
{{ sidem.tab(side, None, "sched") }}

Scheduler

{% if snap %}{{ modes[snap.mode.mode]|upper }} backend {{ snap.backend }}{% endif %}
{% if not snap %}
The scheduler's config cannot be read; wpk sched says why.
{% else %} {% set lim, u = snap.limits, snap.usage %}
{% if snap.mode.mode == "run" %}
{% else %}
{% endif %} {% if snap.mode.mode != "stop" %}
{% endif %} {% if snap.mode.mode != "run" %}{{ modes[snap.mode.mode]|capitalize }} by {{ snap.mode.by }}{% if snap.mode.at %} at {{ snap.mode.at }}{% endif %}{% if snap.mode.reason %}: {{ snap.mode.reason }}{% endif %}. IDEs stay open.{% else %}Halt lets running steps finish; Stop now kills them.{% endif %}
{{ u.cores }}{% if lim.cores %}/{{ lim.cores }}{% endif %}
cores in use
{{ u.jobs }}{% if lim.jobs %}/{{ lim.jobs }}{% endif %}
jobs{% for k, n in u.by_size|dictsort %} · {{ n }} {{ k }}{% endfor %}
{{ snap.queue|selectattr("waiting")|list|length }}
waiting{% if snap.holds %} · {{ snap.holds|length }} project{{ "s" if snap.holds|length != 1 }} on hold{% endif %}
{% if snap.budget %}{% set w = snap.budget.windows[0] %}
{{ "%.0f"|format(100 * w.spent / snap.budget.amount) if snap.budget.amount else 0 }}%
of the budget spent; pace {{ "%.0f"|format(100 * w.pace / snap.budget.amount) if snap.budget.amount else 0 }}%
{% endif %}
{% if snap.backend_down %}
The batch system is not answering ({{ snap.backend_down.why }}), since {{ snap.backend_down.t }}; submits are retried with backoff.
{% endif %} {% if lim.grant %}

Limits lowered by a grant from {{ lim.grant.by or "?" }}{% if lim.grant.expires %} until {{ lim.grant.expires }}{% endif %}.

{% endif %} {% for n in lim.notes %}

{{ n }}

{% endfor %} {% if snap.budget %}

Budget

{{ snap.budget.line }}

{% set pv = snap.budget.provider %}{% if pv %}{% set rd = pv.reading %}

From {{ pv.name }}{% if pv.route %} (route {{ pv.route }}){% endif %}{% if pv.read_at %}, read {{ pv.read_at }}{% endif %}{% if rd %}, complete to {{ rd.as_of }}{% if rd.stage %}; stage {{ rd.stage }}{% endif %}{% if rd.blocked %}; blocked{% endif %}{% if rd.url %}; open{% endif %}{% endif %}.

{% if pv.needs_login %}

Needs a login: {{ pv.error }}{% if pv.renew %}; run {{ pv.renew }}{% endif %}

{% elif pv.error %}

Last read failed: {{ pv.error }}

{% endif %} {% for n in (rd.notes if rd else []) %}

{{ n }}

{% endfor %} {% endif %} {% if chart %} {% for c, d in chart.ceil|dictsort %}{{ c }}'s ceiling{% endfor %} pace spent {% if chart.reserved %}reserved for running steps{% endif %} {{ chart.start }} {{ chart.end }} {{ chart.top }}
spentpace {% for c in ("urgent", "high", "normal", "low", "background") %}{{ c }}{% endfor %} reserved
{% endif %} {% for c in snap.budget.classes %}{% endfor %}
ClassCeiling now
{{ c.class }}{{ c.line }}
{% endif %} {{ xpm.show(xpanels) }} {% if creds %}

Credentials

{% for c in creds %}{% endfor %}
NameSigned in asStatusExpiresRenew
{{ c.name }}{{ c.subject or "" }} {{ c.status }}{% if c.note %} {{ c.note }}{% endif %} {{ c.expires or "" }}{% if c.renew %}{{ c.renew }}{% endif %}
{% endif %}

Queue

{% if snap.queue %}
{% for r in snap.queue %} {% endfor %}
#ProjectPacketClassSizeDueWaiting on
{{ r.pos }} {{ r.project }} {{ r.wpid[:8] }}{% if r.next %} next{% endif %} {{ r['class'] }}{% if r.aged != r['class'] %} → {{ r.aged }}{% endif %} {{ r.size }} {{ r.due }} {{ r.why }}{% if r.clears_at %} (until {{ r.clears_at }}){% endif %}
{% else %}

Nothing is due.

{% endif %}

Jobs

{% if snap.jobs %}
{% for j in snap.jobs %} {% endfor %}
JobKindStateProjectPacketStepSizeSubmittedStarted
{{ j.id }}{{ j.kind }}{{ j.state }}{% if j.cancel %} cancelling{% endif %} {{ j.project }} {{ j.wpid[:8] }} {{ j.step }}{{ j.size }}{{ j.submitted }}{{ j.started or "-" }}
{% else %}

No jobs.

{% endif %} {% endif %} {% set ch = snap.core_hours %} {% if ch.by_size %}

Core-hours, last 7 days

{% for k, t in ch.by_size|dictsort %}{% endfor %}
SizeJobsCore-hoursCPU-hours
{{ k }}{{ t.jobs }}{{ "%.2f"|format(t.core_h) }}{{ "%.2f"|format(t.cpu_h) }}
{% for k, t in ch.by_project|dictsort %}{% endfor %}
ProjectJobsCore-hoursCPU-hours
{{ k }}{{ t.jobs }}{{ "%.2f"|format(t.core_h) }}{{ "%.2f"|format(t.cpu_h) }}
{% if ch.low_cpu %}

{{ ch.low_cpu|length }} multi-core job{{ "s" if ch.low_cpu|length != 1 }} used under 20% of {{ "their" if ch.low_cpu|length != 1 else "its" }} cores (latest: {{ ch.low_cpu[-1].project }} {{ ch.low_cpu[-1].wpid[:8] }}, {{ ch.low_cpu[-1].size }}). Tell the model to use a smaller size until it runs something.

{% endif %} {% endif %}

Recent

{% if events %}
{% for ev in events %} {% endfor %}
{{ ev.t }}{{ ev.type }}{{ ev.by }} {% for k, v in ev|dictsort if k not in ("t", "type", "by") and v is not none %}{{ k }} {{ v if v is not string or v|length < 60 else v[:60] ~ "…" }}{{ " · " if not loop.last }}{% endfor %}
{% else %}

Nothing yet.

{% endif %}
{% endblock %}