Exq.Worker.Server (exq v0.15.0) View Source

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_serialized - Full JSON payload of the Job.
  • manager - Manager process pid.
  • queue - The queue the job came from.
  • stats - Stats process pid.
  • namespace - Redis namespace
  • host - Host name

Expects :work message after initialization to kickoff work.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Worker done with normal termination message.

Callback implementation for GenServer.init/1.

Kickoff work associated with worker.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

dispatch_work(worker_module, job, metadata)

View Source

Worker done with normal termination message.

Callback implementation for GenServer.init/1.

Link to this function

start_link(job_serialized, manager, queue, stats, namespace, host, redis, middleware, metadata)

View Source

Kickoff work associated with worker.