gen_queue_opq v0.1.0 GenQueue.Adapters.OPQMock View Source

An adapter for GenQueue to enable mock functionaility with OPQ.

Link to this section Summary

Functions

Push a job that will be returned to the current (or globally set) processes mailbox

Link to this section Functions

Link to this function handle_push(gen_queue, module, opts) View Source
handle_push(GenQueue.t(), GenQueue.Adapters.OPQ.job(), list()) ::
  {:ok, GenQueue.Adapters.OPQ.pushed_job()} | {:error, any()}

Push a job that will be returned to the current (or globally set) processes mailbox.

Please see GenQueue.Test for further details.

Parameters:

  • gen_queue - Any GenQueue module
  • job - Any valid job format
  • opts - A keyword list of job options

Returns:

  • {:ok, {module, args, opts}} if the operation was successful
  • {:error, reason} if there was an error
Link to this function start_link(gen_queue, opts) View Source

Callback implementation for GenQueue.Adapter.start_link/2.