Durable.Wait.TimeoutWorker (Durable v2.0.2)

View Source

Background worker that enforces timeouts for pending inputs and events, and wakes waiting runs that passed their workflow timeout: so they fail now rather than when their wait ends. A run past its timeout: on a queue no live node polls is handed to a queue that is polled, since no worker will ever claim it where it is. The worker that claims it there fails it.

Periodically checks for timed-out waits and either:

  • Resumes the workflow with the timeout_value (if on_timeout: :resume)
  • Fails the workflow (if on_timeout: :fail)

Summary

Functions

Manually triggers a timeout check.

Returns a specification to start this module under a supervisor.

Starts the timeout worker.

Returns the process name for a given Durable instance.

Functions

check_timeouts(durable_name \\ Durable)

Manually triggers a timeout check.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

Starts the timeout worker.

Options

  • :config - The Durable config (required)
  • :interval - Check interval in milliseconds (default: 60_000)
  • :batch_size - Rows a sweep reads at a time (default: 500)

worker_name(durable_name)

Returns the process name for a given Durable instance.