Exq.Enqueuer (exq v0.15.0) View Source

Enqueuer.

Link to this section Summary

Link to this section Functions

Link to this function

enqueue(pid, queue, worker, args)

View Source

Enqueue a job immediately.

Expected args:

  • pid - PID for Exq Manager or Enqueuer to handle this
  • queue - Name of queue to use
  • worker - Worker module to target
  • args - Array of args to send to worker
  • options - job options, for example [max_retries: Integer, jid: String]

Returns:

  • {:ok, jid} if the job was enqueued successfully, with jid = Job ID.
  • {:error, reason} if there was an error enqueueing job
Link to this function

enqueue(pid, queue, worker, args, options)

View Source
Link to this function

enqueue_at(pid, queue, time, worker, args)

View Source

Schedule a job to be enqueued at a specific time in the future.

Expected args:

  • pid - PID for Exq Manager or Enqueuer to handle this
  • queue - name of queue to use
  • time - Time to enqueue
  • worker - Worker module to target
  • args - Array of args to send to worker
  • options - job options, for example [max_retries: Integer, jid: String]
Link to this function

enqueue_at(pid, queue, time, worker, args, options)

View Source
Link to this function

enqueue_in(pid, queue, offset, worker, args)

View Source

Schedule a job to be enqueued at in the future given by offset in seconds.

Expected args:

  • pid - PID for Exq Manager or Enqueuer to handle this
  • queue - Name of queue to use
  • offset - Offset in seconds in the future to enqueue
  • worker - Worker module to target
  • args - Array of args to send to worker
  • options - job options, for example [max_retries: Integer]
Link to this function

enqueue_in(pid, queue, offset, worker, args, options)

View Source