Durable.Queue.StaleJobRecovery (Durable v0.1.0-rc)
View SourcePeriodically recovers jobs with stale locks.
Jobs can become "stuck" if a worker process crashes without releasing the lock. This GenServer periodically checks for such jobs and releases them back to pending status so they can be picked up again.
Summary
Functions
Returns a specification to start this module under a supervisor.
Manually triggers stale lock recovery.
Starts the stale job recovery process.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec recover_now(atom()) :: {:ok, non_neg_integer()} | {:error, term()}
Manually triggers stale lock recovery.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the stale job recovery process.
Options
:config- The Durable configuration (required):interval- Milliseconds between recovery checks (default: 60000)