Remote checks fail fast when the worker is down and no longer pile up
While the worker was stopped (maintenance), checks were queued with nobody to
run them; agents timed out ("fetch failed", 502 after a restart) and every
retry queued another copy. Now: the worker writes a heartbeat and a check is
refused with 503 at once while it is down; a retry of the same files joins
the job already queued or running; a job nobody waits for any more is
dropped. TD_KEEP_WORKER=1 deploys without touching the worker.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
This commit is contained in:
parent
0710882703
commit
9cfa55c9b2
6 changed files with 73 additions and 20 deletions
|
|
@ -232,7 +232,8 @@ export class Store {
|
|||
this.addColumn('func_status', 'confirmed', 'INTEGER NOT NULL DEFAULT 0');
|
||||
// Fingerprint of main's compiled code per function (submissions may only change their own tasks).
|
||||
this.addColumn('func_status', 'code_hash', 'TEXT');
|
||||
this.addColumn('versions', 'label', 'TEXT'); // human-readable name, e.g. "World of Warcraft 5.0.3 (build 15890, x64)"
|
||||
this.addColumn('versions', 'label', 'TEXT');
|
||||
this.addColumn('check_jobs', 'files_hash', 'TEXT'); // a retry of the same check joins the queued one // human-readable name, e.g. "World of Warcraft 5.0.3 (build 15890, x64)"
|
||||
this.addColumn('attempts', 'batch_id', 'INTEGER REFERENCES batches(id)');
|
||||
this.db.exec('CREATE INDEX IF NOT EXISTS attempts_batch ON attempts(batch_id)');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue