Expand description
The tick-interval scaffold shared by every background worker that polls the database on a fixed
period: regrader, chatbot_syncer and the credit registration phase runners.
Structs§
- Periodic
Worker Config - How a worker’s ticking loop should behave, so the loop itself carries none of that per-worker detail.
- Still
Running Log - The “still running” heartbeat line a worker logs every
everyticks.
Functions§
- run_
periodic_ worker - Runs
bodyonconfig.tick_intervalforever, logging the still-running line if there is one. Abodythat returnsErrstops the loop and becomes this function’s return value. - run_
periodic_ worker_ until run_periodic_workerthat returnsOkonceshutdownis cancelled. An iteration already running is left to finish; only the wait for the next tick is cut short.