Exq.Scheduler.Server (exq v0.19.0) View Source

The Scheduler is responsible for monitoring the schedule and retry queues. These queues use a Redis sorted set (term?) to schedule and pick off due jobs. Once a job is at or past it's execution date, the Scheduler moves the job into the live execution queue.

Runs on a timed loop according to scheduler_poll_timeout.

Initialization:

  • :name - Name of target registered process
  • :namespace - Redis namespace to store all data under. Defaults to "exq".
  • :queues - Array of currently active queues (TODO: Remove, I suspect it's not needed).
  • :redis - pid of Redis process.
  • :scheduler_poll_timeout - How often to poll Redis for scheduled / retry jobs.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Dequeue any active jobs in the scheduled and retry queues, and enqueue them to live queue.

Callback implementation for GenServer.init/1.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Dequeue any active jobs in the scheduled and retry queues, and enqueue them to live queue.

Callback implementation for GenServer.init/1.