Skip to main content

Module waker

Module waker 

Source
Expand description

Wake-up of runs paused in Sleeping.

A run sleeps after a ctx.delay step, or while ctx.wait_for_signal waits for a signal. Its wake-up time (scheduled_at) lives on the run row, so it survives an API or worker restart. The Waker periodically hands every due run to the engine’s RunWaker, which moves it back to Pending and, when the API has no worker, resumes it in-process.

A run wakes exactly once even when several API instances run this loop.

Structs§

Waker
Periodic task that wakes Sleeping runs whose scheduled_at has passed.

Constants§

DEFAULT_WAKER_BATCH_SIZE
How many runs a single tick wakes.
DEFAULT_WAKER_INTERVAL
How often due sleeping runs are collected.