Skip to main content

Module worker_registry

Module worker_registry 

Source
Expand description

In-memory record of the workers that recently asked for a run.

Every call to the internal pick route carrying a worker_id records the capabilities the worker advertised. The run detail route reads it back to tell whether a pending run can be taken by any worker seen recently, so a run whose required tags no worker carries is flagged instead of waiting in silence.

The record lives in the API process: with several API replicas, each one only knows the workers that polled it.

Structs§

WorkerRegistry
Workers seen by the pick route within WORKER_SEEN_TTL.

Constants§

WORKER_SEEN_TTL
How long a worker counts as seen after its last pick request.