Runs is the queue's elements and a Problems log; a Kill lands between boards

Run one stage goes: the cascade is the unit of work and app job keeps the
per-stage entry points. The pull button is disabled while a pull runs and
the lede no longer hardcodes the cadence. Messages folds into Runs as
Problems. pull_batch checks for a cancel before every board, one plugin per
target, and both plugins now close their HTTP client.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-28 16:10:38 +02:00
1 parent cebe62ddc9
commit 8532e4e739
15 files changed
+284 -242

No files matched your search

+23 -28
View File
@@ -1,14 +1,15 @@
{% extends "settings/_layout.html" %}
{% block title %}Sources — roledesk{% endblock %}
{# One page, four sections: the `search` plugin's job board queries, the
`ats` plugin's company boards, the runs that read both, and the message
log. One is shown at a time, the one the URL fragment names (`#runs`), or
Job boards without one; sources.js hides the rest and the rail picks one.
Hidden rather than separate pages, because each section keeps the element
ids it had as a page of its own and its script (sources.js, companies.js,
jobs.js, messages.js) is unchanged: it finds its root or does nothing. The
ids are `SECTIONS` in app/web/pages.py, which the rail links to. #}
{# One page, three sections: the `search` plugin's job board queries, the
`ats` plugin's company boards, and the runs that read both, with the
message log as their last block. One is shown at a time, the one the URL
fragment names (`#runs`) or contains (`#messages`), or Job boards without
one; sources.js hides the rest and the rail picks one. Hidden rather than
separate pages, because each section keeps the element ids it had as a
page of its own and its script (sources.js, companies.js, jobs.js,
messages.js) is unchanged: it finds its root or does nothing. The ids are
`SECTIONS` in app/web/pages.py, which the rail links to. #}
{% block content %}
<h1>Sources</h1>
<p class="lede">Sources are where roles come from: queries on job boards that span companies, and the boards of the companies you follow. Each section is one plugin; the runs read them all.</p>
@@ -109,18 +110,18 @@
<section class="card" id="runs" data-section>
<div class="row-between">
<h2>Runs</h2>
<button type="button" id="pull-now" class="secondary">Pull now</button>
<button type="button" id="pull-now" class="secondary">Run the pull now</button>
</div>
<p class="lede">Every 6 hours the pull reads every board, embed and score rank every role, extract fills in what the best postings say, score runs again with what it filled, and summarise writes the summaries. Change the cadence below.</p>
<p class="lede">On the schedule below the pull reads every board, embed and score rank every role, extract fills in what the best postings say, score runs again with what it filled, and summarise writes the summaries.</p>
<h3>What is running</h3>
{# The heading and the idle line are the app's: the element takes up no
space while the queue is idle — that is its `idle="hide"` default, and a
strip that is always there is furniture — and a heading with nothing
under it reads as something that failed to load. The element and its
script are the queue's own, served by its own router — see
pipeline/web/static/jobs.js. #}
<p class="muted small" id="idle">Nothing at the moment.</p>
under it reads as something that failed to load. The line is hidden
until jobs.js has the first snapshot. The element and its script are the
queue's own, served by its own router — see pipeline/web/static/jobs.js. #}
<p class="muted small" id="idle" hidden>Nothing at the moment.</p>
<script type="module" src="/_jobs/jobs.js"></script>
<desk-jobs></desk-jobs>
@@ -132,22 +133,16 @@
<script type="module" src="/_jobs/schedules.js"></script>
<desk-schedules></desk-schedules>
<details class="stage">
<summary>Run one stage</summary>
<div id="kinds" class="buttons">
<span class="muted">loading…</span>
{# The message log, the queue's own through `/api/notices`. `#messages` is
where the old Messages paths and the toasts' "all messages" link land. #}
<div id="messages">
<div class="row-between">
<h3>Problems</h3>
<button type="button" id="clear-all" class="secondary">Clear all</button>
</div>
</details>
</section>
<section class="card" id="messages" data-section>
<div class="row-between">
<h2>Messages</h2>
<button type="button" id="clear-all" class="secondary">Clear all</button>
<p class="lede">What the server said that nobody has cleared, newest first. A message goes when you clear it, or a fortnight after it was last said.</p>
<div id="notices"><span class="muted">loading…</span></div>
</div>
<p class="lede">What the server said that nobody has cleared, newest first. A message goes when you clear it, or a fortnight after it was last said.</p>
<div id="notices"><span class="muted">loading…</span></div>
</section>
{% endblock %}