exq v0.6.4 Exq.Middleware.Pipeline

Pipeline is a structure that is used as an argument in functions of module with Exq.Middleware.Behaviour behaviour. This structure must be returned by particular function to be used in the next middleware based on defined middleware chain.

Pipeline contains the following options:

  • assigns - map that contains shared data across the whole job lifecycle
  • worker_pid - process id of Exq.Worker.Server
  • event - name of current middleware function, possible values are: before_work, after_processed_work and after_failed_work
  • halted - flag indicating whether pipeline was halted, defaults to false

Summary

Functions

Puts the key with value equal to value into assigns map

Implements middleware chain: sequential call of function with pipeline.event name inside module module

Sets halted to true

Functions

assign(pipeline, key, value)

Puts the key with value equal to value into assigns map

assign_worker_state(pipeline, worker_state)

Puts a state of Exq.Worker.Server into assigns map

chain(pipeline, arg2)

Implements middleware chain: sequential call of function with pipeline.event name inside module module

halt(pipeline)

Sets halted to true