Polls Postgres for runnable workflow runs and starts local engines.
The dispatcher claims work with SELECT ... FOR UPDATE SKIP LOCKED inside a
transaction, assigns a fresh fencing token, and then resumes an engine with
that token. Multiple dispatchers can poll concurrently; locked rows are
skipped rather than contended.
Summary
Functions
Returns a specification to start this module under a supervisor.
Run one dispatch pass synchronously.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec dispatch_once(keyword()) :: {:ok, non_neg_integer()} | {:error, term()}
Run one dispatch pass synchronously.