Continuum.Runtime.Dispatcher (continuum v0.5.0)

Copy Markdown View Source

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

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

dispatch_once(opts \\ [])

@spec dispatch_once(keyword()) :: {:ok, non_neg_integer()} | {:error, term()}

Run one dispatch pass synchronously.