Rebuild: phase 2's prober reads the probe queue
Test and deploy / test (push) Successful in 50s
Test and deploy / deploy (push) Successful in 1m46s

probe:run (compose service prober, PROBE_CONNECTIONS, default 6) claims
waiting candidates of settled releases (lone, then par2, then archive),
fetches each article with BODY over connections of its own (no
compression) and inspects it: the yEnc name and size, the content type
from the first bytes, a par2 set's files, a RAR volume's entries and
whether they're encrypted. Results per release and kind in
release_inspections (CHUNK_TABLESPACE, the HDD); on the release
passworded, inner_name (the largest content name) and inspected_at.
430 = missing, not yEnc = error, both final; connection trouble puts
the candidate back.

Fetch and parse in one process: an article takes ~0.1 s per connection,
parsing a few ms (no queue in between). Parsers from voyager 1 (lib/yenc,
lib/rar, lib/par2, lib/content sniff) with their tests; XoverClient.body;
yencode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-11 15:32:49 +02:00
1 parent d72fe2f13f
commit 8bd6d6aa5f
30 files changed
+1666 -7

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { BaseCommand } from '@adonisjs/core/ace'
import type { CommandOptions } from '@adonisjs/core/types/ace'
import { Prober } from '#services/prober'
/** Phase 2's prober (REBUILD.md, part 6): reads the probe queue's articles and stores what they show. */
export default class ProbeRun extends BaseCommand {
static commandName = 'probe:run'
static description = "Reads the probe queue's articles (PROBE_CONNECTIONS) and stores what they show"
static options: CommandOptions = { startApp: true, staysAlive: true }
async run() {
const prober = new Prober()
let done: () => void
const finished = new Promise<void>((resolve) => (done = resolve))
this.app.terminating(async () => {
this.logger.info('Stopping: finishing the articles in flight.')
prober.stop()
await finished
})
await prober.run()
this.logger.info('Prober stopped.')
done!()
await this.terminate()
}
}