Verk v1.6.1 Verk.WorkersManager

A WorkersManager assign jobs to workers from a pool (handled by poolboy) monitoring the job.

It interacts with the related QueueManager to request jobs and to schedule jobs to be retried

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Create a table to monitor workers saving data about the assigned queue/pool

List information about the process that is currently running a job_id

Returns the atom that represents the WorkersManager of the queue

Pauses a queue

Resumes a queue

Link to this section Functions

Link to this function child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Create a table to monitor workers saving data about the assigned queue/pool

Link to this function inspect_worker(queue, job_id)
inspect_worker(binary() | atom(), binary()) ::
  {:ok, Map.t()} | {:error, :not_found}

List information about the process that is currently running a job_id

Link to this function name(queue)
name(binary() | atom()) :: atom()

Returns the atom that represents the WorkersManager of the queue

Link to this function pause(queue)
pause(binary() | atom()) :: :ok | :already_paused

Pauses a queue

Link to this function resume(queue)
resume(binary() | atom()) :: :ok | :already_running

Resumes a queue.

Link to this function running_jobs(queue, limit \\ 100)

List running jobs

Example:

[%{process: #PID<0.186.0>, job: %Verk.Job{...}, started_at: %DateTime{...}} ]