exq v0.6.4 Exq.Worker.Server

Worker process is responsible for the parsing and execution of a Job. It then broadcasts results to Stats / Manager.

Currently uses the terminate callback to track job success/failure .

Initialization:

  • job_json - Full JSON payload of the Job.
  • manager - Manager process pid.
  • queue - The queue the job came from.
  • :work_table - In process work ets table (TODO: Remove).
  • stats - Stats process pid.
  • namespace - Redis namespace
  • host - Host name

Expects :work message after initialization to kickoff work.

Summary

Functions

dispatch_work(worker_module, args)
handle_cast(msg, state)

Worker done with normal termination message

start_link(job_json, manager, queue, work_table, stats, namespace, host, redis, middleware)
work(pid)

Kickoff work associated with worker.