Exq.Api (exq v0.22.0)
View SourceInterface for retrieving Exq stats.
Pid is currently Exq.Api process.
Summary
Functions
Number of busy workers
Re Enqueue jobs from dead queue.
Re enqueue jobs from retry queue immediately.
Enqueue jobs from scheduled queue immediately.
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.
Find failed job
Find job in retry queue
Find job in scheduled queue
List jobs enqueued
List jobs enqueued
List of worker nodes currently running
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 from the queue specified.
Removes a job in the queue of jobs that have failed and exceeded their retry count.
Removes jobs from dead queue.
Removes a job from the queue specified.
Clear / Remove queue
Removes a job in the retry queue from being enqueued again.
Removes jobs from retry queue.
Removes a job scheduled to run in the future from being enqueued.
Removes jobs from scheduled queue.
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.
Send signal to the given node.
Return stat for given key.
Functions
Number of busy workers
Expected args:
- pid- Exq.Api process
Returns:
- {:ok, num_busy}- number of busy workers
Re Enqueue jobs from dead queue.
Expected args:
- pid- Exq.Api process
- raw_jobs- list of raw json encoded job values
Returns:
- {:ok, num_enqueued}
Re enqueue jobs from retry queue immediately.
Expected args:
- pid- Exq.Api process
- raw_jobs- list of raw json encoded job values
Returns:
- {:ok, num_enqueued}
Enqueue jobs from scheduled queue immediately.
Expected args:
- pid- Exq.Api process
- raw_jobs- list of raw json encoded job values
Returns:
- {:ok, num_enqueued}
List jobs that have failed and will not retry, as they've exceeded their retry count.
Expected args:
- pid- Exq.Api process
- options- score: (boolean) whether to include job score
- size: (integer) size of list
- offset: (integer) start offset of the list
 
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
Find failed job
Expected args:
- pid- Exq.Api process
- score- Job score
- jid- Job jid
- options- raw: (boolean) whether to deserialize the job
 
Returns:
- {:ok, job}
Find job in retry queue
Expected args:
- pid- Exq.Api process
- score- Job score
- jid- Job jid
- options- raw: (boolean) whether to deserialize the job
 
Returns:
- {:ok, job}
Find job in scheduled queue
Expected args:
- pid- Exq.Api process
- score- Job score
- jid- Job jid
- options- raw: (boolean) whether to deserialize the job
 
Returns:
- {:ok, job}
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
- options- size: (integer) size of list
- offset: (integer) start offset of the list
- raw: (boolean) whether to deserialize the job
 
Returns:
- {:ok, [jobs]}
List of worker nodes currently running
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 from the queue specified.
Expected args:
- pid- Exq.Api process
- queue- The name of the queue to remove the job from
- raw_jobs- list of raw json encoded job values
- options- clear_unique_tokens: (boolean) whether to clear jobs unique tokens, default is false
 
- clear_unique_tokens: (boolean) whether to clear jobs unique tokens, default is 
Returns:
- :ok
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
Removes jobs from dead queue.
Expected args:
- pid- Exq.Api process
- raw_jobs- list of raw json encoded job values
- options- clear_unique_tokens: (boolean) whether to clear jobs unique tokens, default is false
 
- clear_unique_tokens: (boolean) whether to clear jobs unique tokens, default is 
Returns:
- :ok
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
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
Removes jobs from retry queue.
Expected args:
- pid- Exq.Api process
- raw_jobs- list of raw json encoded job values
- options- clear_unique_tokens: (boolean) whether to clear jobs unique tokens, default is false
 
- clear_unique_tokens: (boolean) whether to clear jobs unique tokens, default is 
Returns:
- :ok
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
Removes jobs from scheduled queue.
Expected args:
- pid- Exq.Api process
- raw_jobs- list of raw json encoded job values
- options- clear_unique_tokens: (boolean) whether to clear jobs unique tokens, default is false
 
- clear_unique_tokens: (boolean) whether to clear jobs unique tokens, default is 
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
- options- score: (boolean) whether to include job score
- size: (integer) size of list
- offset: (integer) start offset of the list
 
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
- options- score: (boolean) whether to include job score
- size: (integer) size of list
- offset: (integer) start offset of the list
 
Returns:
- {:ok, [jobs]}
Number of scheduled jobs enqueued.
Expected args:
- pid- Exq.Api process
Returns:
- {:ok, num_scheduled}- 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.
Expected args:
- pid- Exq.Api process
Returns:
- {:ok, [{job, scheduled_at}]}
Send signal to the given node.
Expected args:
- pid- Exq.Api process
- node_id- node identifier
- signal_name- Name of the signal.
Supported Signals
- TSTP - unsubscibe from all queues
Returns:
- :ok
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