Expand description
RunWaker – wakes Sleeping runs whose scheduled_at has passed.
A run goes Sleeping when a delay
step pauses it, or when
wait_for_signal suspends
it until a signal or its deadline. Either way the wake-up time lives on the
run itself (scheduled_at), so the timer survives an API or worker restart:
nothing is held in memory, and a brand-new process picks the run up on its
next tick.
RunWaker::tick claims every due run and moves it back to Pending in
the same transaction that clears scheduled_at, so a run wakes exactly
once even with several API instances running a waker. Under
ExecutionMode::Workers a worker then picks the run up; under
ExecutionMode::Local the waker resumes it in-process.
Structs§
- RunWaker
- Wakes
Sleepingruns whose wake-up time has passed.
Constants§
- DEFAULT_
WAKE_ BATCH_ SIZE - How many runs a single
RunWaker::tickwakes.