MechaCat02
7d80a437bf
feat(analysis): worker daemon + real dispatcher + app wiring
The background analysis worker that drains analyze_page jobs:
- analysis::daemon: a lean sibling of the crawler daemon — leases only
KIND_ANALYZE_PAGE, skip-if-done-unless-force, lease heartbeat, panic +
timeout isolation, ack done/failed, and a failed page_analysis row on
terminal (dead-lettered) failure. AnalyzeDispatcher trait seam.
- RealAnalyzeDispatcher: load page → storage.get → VisionClient.analyze →
persist_analysis (skips a deleted page; caps image bytes).
- app::build spawns the daemon (own plain reqwest client) when
ANALYSIS_ENABLED; AppHandle/main shut it down alongside the crawler.
- repo::page::find_by_id.
Tests: dispatch+ack-done, skip-when-done, force re-dispatch, terminal
failure writes failed row, panic isolation, ignores non-analyze jobs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 18:51:53 +02:00
..
2026-06-13 18:39:03 +02:00
2026-05-22 23:15:36 +02:00
2026-06-13 18:51:53 +02:00
2026-06-13 18:39:03 +02:00
2026-06-06 18:49:56 +02:00
2026-05-30 22:23:55 +02:00
2026-06-01 22:00:09 +02:00
2026-06-13 18:39:03 +02:00
2026-05-30 22:23:55 +02:00
2026-05-31 14:00:31 +02:00
2026-05-31 13:56:18 +02:00
2026-05-17 14:39:11 +02:00
2026-05-25 20:59:14 +02:00
2026-05-22 23:37:07 +02:00
2026-06-13 15:51:38 +02:00
2026-05-17 17:43:06 +02:00
2026-05-17 14:32:03 +02:00
2026-05-17 18:19:52 +02:00
2026-05-28 20:24:51 +02:00
2026-05-28 20:24:51 +02:00
2026-06-13 15:52:37 +02:00
2026-06-13 18:27:08 +02:00
2026-06-13 17:44:38 +02:00
2026-05-17 13:15:03 +02:00
2026-06-01 20:11:22 +02:00
2026-05-28 20:24:51 +02:00
2026-05-22 23:37:07 +02:00
2026-05-31 15:47:47 +00:00
2026-06-06 18:49:56 +02:00
2026-06-06 18:49:56 +02:00
2026-06-06 18:49:56 +02:00
2026-05-29 23:49:28 +02:00
2026-06-03 07:25:09 +02:00
2026-05-16 21:41:20 +02:00
2026-06-06 18:49:56 +02:00