Durable.Queue.Worker (Durable v0.1.0-rc)
View SourceExecutes a single workflow job in an isolated process.
Each worker runs under a DynamicSupervisor with restart: :temporary,
ensuring that:
- Each workflow execution is isolated
- A crash in one worker does not affect others
- Workers are not automatically restarted (stale lock recovery handles retries)
The worker spawns job execution in a separate Task, allowing the GenServer
to send periodic heartbeats to update locked_at and prevent stale lock
recovery from incorrectly reclaiming long-running jobs.
Summary
Functions
Returns a specification to start this module under a supervisor.
Starts a worker process to execute a job.
Types
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(keyword()) :: GenServer.on_start()
Starts a worker process to execute a job.
Options
:job- The job map to execute (required):config- The Durable configuration (required):poller_pid- The poller process to report completion to (required)