Temporalex.Worker (Temporalex v0.5.0)

Copy Markdown View Source

Supervisor for one Temporalex worker instance.

A worker is a poller + executor bound to one task queue — the deployment topology written down: this node serves these workflows. The minimal spec is just that statement:

{Temporalex.Worker, workflows: [Booking, Waitlist], activities: [Bookings.Activities]}

Everything else is derived:

  • task_queue: — read from the workflow modules' use ..., queue: declarations, with a boot error if they disagree (the misrouting bug caught at startup instead of as a silent hang). Stating it explicitly still works and overrides.
  • client: — defaults to the app's default client.
  • name: — derived from the queue, overridable.

Summary

Functions

activity_supervisor_name(worker_name)

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

executor_supervisor_name(worker_name)

server_name(worker_name)

server_pid(worker_name)

start_link(opts)