Verk.enqueue

You're seeing just the function enqueue, go back to Verk module for more information.
Link to this function

enqueue(job, redis \\ Verk.Redis)

View Source

Specs

enqueue(
  %Verk.Job{
    args: term(),
    class: term(),
    created_at: term(),
    enqueued_at: term(),
    error_backtrace: term(),
    error_message: term(),
    failed_at: term(),
    finished_at: term(),
    jid: term(),
    max_retry_count: term(),
    original_json: term(),
    queue: term(),
    retried_at: term(),
    retry_count: term()
  },
  GenServer.server()
) :: {:ok, binary()} | {:error, term()}

Enqueues a Job to the specified queue returning the respective job id.

The job must have:

  • a valid queue
  • a list of args to perform
  • a module to perform (class)
  • a valid jid

Optionally a Redix server can be passed which defaults to Verk.Redis.