Repository navigation
fix(daemon): re-arm stuck sweep with live interval config on each pass (Refs #3635) - #4089
shravansumanthanan wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Thanks, @shravansumanthanan, for this and for building on @billbenetti's #3635 report: a small change inside the existing scheduler, with no new setting, and a test for the live interval. Two independent reviews read the source at
This is from reading the source; I haven't run the PR locally. |
Summary
setIntervalinstartStuckSweepScheduler(packages/daemon/src/index.ts) with a self-rearmingsetTimeoutthat callsresolveStuckSweepIntervalSeconds()after each pass finishes, sorig config set queue.stuck_sweep_interval_secondstakes effect on the next pass without a daemon restart and passes never overlap.{ stop(): void }handle cleared during daemon shutdown, while keepingrunningSinceandskippedTicks(always0) onstuckSweepStatusfor/healthzcompatibility.packages/daemon/test/queue-stuck-sweep-scheduler.test.tsand add a regression test verifying dynamic interval updates andstop().Verification
npm -w @openrig/daemon test -- test/queue-stuck-sweep-scheduler.test.ts(3/3 passed)npm run lint(passed)Refs #3635 (addresses item 3: interval read only at boot)
Summary by CodeRabbit