Skip to main content

Module workers

Module workers 

Source
Expand description

The workers the master knows, their queues and slots, and the choice of a worker for a task (see archive/PROJECT.md, Task assignment).

Spread: among the active workers serving the task’s queue with a free slot, the one with the most free slots; ties go to the least recently assigned, then the worker ID. A worker with no queues configured serves the default queue. Slots count the attempts assigned to the worker and not yet finished.

Eligible workers also have the task’s root at its current hash (only the newest code runs) and a schedr version at least that of the parse the task’s DAG version came from (see archive/PROJECT.md, Code versions and change detection, and Upgrades and compatibility).

Structs§

Needs
What a task needs of a worker.
Worker
A registered worker.
Workers
The registered workers.

Enums§

WorkerState
A worker’s state as the master sees it.

Constants§

DEFAULT_QUEUE
The queue of tasks with no queue, served by workers with no queues configured.
DEFAULT_WATCHER_SLOTS
A worker’s watcher slots until it says ([watchers] slots).