You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: integrate Perpetual pattern into LoopService classes
This PR refactors the server services to use docket's Perpetual pattern following the "find and flood" approach:
- Added Perpetual monitor tasks to 5 services:
- Repossessor: monitor_expired_leases
- CancellationCleanup: monitor_cancelled_flow_runs, monitor_subflow_runs
- FailExpiredPauses: monitor_expired_pauses
- Foreman: monitor_worker_health
- MarkLateRuns: monitor_late_runs
- Services maintain backward compatibility:
- Keep existing LoopService class structure
- Tests can still call service.start(loops=1) without docket
- run_once() provides fallback for inline execution
- Perpetual monitors use automatic=True for worker startup scheduling
- Each monitor finds work and floods docket queue with processing tasks
All 53 service tests pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments