show noops in done column, add search bars, remove idle card, fix single-job drain, prevent noop vanish on toggle
Build and Push Docker Image / build (push) Has been cancelled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-21 18:14:54 +02:00
parent d38e4d4290
commit 6b9606a05b
11 changed files with 104 additions and 49 deletions
+4 -4
View File
@@ -63,7 +63,7 @@ function emitQueueStatus(
for (const l of jobListeners) l(line);
}
async function runSequential(initial: Job[]): Promise<void> {
async function runSequential(initial: Job[], { drain = true } = {}): Promise<void> {
if (queueRunning) return;
queueRunning = true;
queueAbort = new AbortController();
@@ -115,8 +115,8 @@ async function runSequential(initial: Job[]): Promise<void> {
// When the local queue drains, re-check the DB for jobs that were
// approved mid-run. Without this they'd sit pending until the user
// manually clicks "Run all" again. Skip if aborted — user wants to stop.
if (queue.length === 0 && !signal.aborted) {
// manually clicks "Run all" again. Skip if aborted or drain=false.
if (drain && queue.length === 0 && !signal.aborted) {
const more = db.prepare("SELECT * FROM jobs WHERE status = 'pending' ORDER BY created_at").all() as Job[];
enqueueUnseenJobs(queue, seen, more);
}
@@ -253,7 +253,7 @@ app.post("/job/:id/run", async (c) => {
if (!result) return c.notFound();
return c.json(result);
}
runSequential([job]).catch((err) => logError(`Job ${job.id} failed:`, err));
runSequential([job], { drain: false }).catch((err) => logError(`Job ${job.id} failed:`, err));
const result = loadJobRow(jobId);
if (!result) return c.notFound();
return c.json(result);