Exq.Api (exq v0.15.0) View Source

Interface for retrieving Exq stats.

Pid is currently Exq.Api process.

Link to this section Summary

Functions

Number of busy workers

List jobs that have failed and will not retry, as they've exceeded their retry count.

Number of jobs that have failed and exceeded their retry count.

List jobs enqueued

List jobs enqueued

List of processes currently running

A count of the number of jobs in the queue, for each queue.

A count of the number of jobs in the queue, for a provided queue.

List of queues with jobs (empty queues are deleted).

Removes a job in the queue of jobs that have failed and exceeded their retry count.

Removes a job from the queue specified.

Clear / Remove queue

Removes a job in the retry queue from being enqueued again.

Removes a job scheduled to run in the future from being enqueued.

List jobs that will be retried because they previously failed and have not exceeded their retry_count.

Number of jobs in the retry queue.

List jobs that are enqueued and scheduled to be run at a future time.

Number of scheduled jobs enqueued.

List jobs that are enqueued and scheduled to be run at a future time, along with when they are scheduled to run.

Return stat for given key.

Link to this section Functions

Number of busy workers

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, num_busy} - number of busy workers

List jobs that have failed and will not retry, as they've exceeded their retry count.

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, [jobs]}

Number of jobs that have failed and exceeded their retry count.

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, num_failed} - number of failed jobs
Link to this function

find_job(pid, queue, jid)

View Source
Link to this function

find_scheduled(pid, jid)

View Source

List jobs enqueued

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, [{queue, [jobs]}, {queue, [jobs]}]}

List jobs enqueued

Expected args:

  • pid - Exq.Api process
  • queue - Queue name

Returns:

  • {:ok, [jobs]}

List of processes currently running

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, [processes]}

A count of the number of jobs in the queue, for each queue.

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, [{queue, num_jobs}, {queue, num_jobs}]}

A count of the number of jobs in the queue, for a provided queue.

Expected args:

  • pid - Exq.Api process
  • queue - The name of the queue to find the number of jobs for

Returns:

  • {:ok, num_jobs}

List of queues with jobs (empty queues are deleted).

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, queues} - list of queue

Removes a job in the queue of jobs that have failed and exceeded their retry count.

Expected args:

  • pid - Exq.Api process
  • jid - Unique identifier for the job

Returns:

  • :ok
Link to this function

remove_job(pid, queue, jid)

View Source

Removes a job from the queue specified.

Expected args:

  • pid - Exq.Api process
  • queue - The name of the queue to remove the job from
  • jid - Unique identifier for the job

Returns:

  • :ok
Link to this function

remove_queue(pid, queue)

View Source

Clear / Remove queue

Expected args:

  • pid - Exq.Api process
  • queue - Queue name

Returns:

  • {:ok, queues} - list of queue

Removes a job in the retry queue from being enqueued again.

Expected args:

  • pid - Exq.Api process
  • jid - Unique identifier for the job

Returns:

  • :ok
Link to this function

remove_scheduled(pid, jid)

View Source

Removes a job scheduled to run in the future from being enqueued.

Expected args:

  • pid - Exq.Api process
  • jid - Unique identifier for the job

Returns:

  • :ok

List jobs that will be retried because they previously failed and have not exceeded their retry_count.

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, [jobs]}

Number of jobs in the retry queue.

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, num_retry} - number of jobs to be retried

List jobs that are enqueued and scheduled to be run at a future time.

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, [jobs]}

Number of scheduled jobs enqueued.

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, num_scheduled} - number of scheduled jobs enqueued
Link to this function

scheduled_with_scores(pid)

View Source

List jobs that are enqueued and scheduled to be run at a future time, along with when they are scheduled to run.

Expected args:

  • pid - Exq.Api process

Returns:

  • {:ok, [{job, scheduled_at}]}

Return stat for given key.

Examples of keys are processed and failed.

Expected args:

  • pid - Exq.Api process
  • key - Key for stat
  • queue - Queue name

Returns:

  • {:ok, stat} stat for key