fix(crawler): panic-isolate the cron tick body (0.36.5)

Worker dispatch was already wrapped in AssertUnwindSafe(...)
.catch_unwind() — a panicking handler ack's the job failed and the
worker keeps going. The cron tick had no such guard: a panic in
metadata.run, enqueue_bookmarked_pending, reap_done, or
write_last_tick would kill the cron task. The JoinSet would drop it,
workers would keep running, and no future metadata pass would ever
fire until daemon restart.

Wrap the tick body (between advisory-lock acquire and unlock) in the
same AssertUnwindSafe(...).catch_unwind() pattern. The unlock and
connection drop run unconditionally so a panicked tick doesn't leave
the lock held for another replica.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
MechaCat02
2026-05-30 20:08:11 +02:00
parent 655ea42731
commit 5c04b0532b
4 changed files with 49 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "mangalord"
version = "0.36.4"
version = "0.36.5"
edition = "2021"
default-run = "mangalord"