plynx.service.worker
¶
Main PLynx worker service and utils
Module Contents¶
-
class
plynx.service.worker.
Worker
(worker_config: WorkerConfig, worker_id: Optional[str])[source]¶ Worker main class.
On the high level Worker distributes Jobs over all available Workers and updates statuses of the Graphs in the database.
- Worker performs several roles:
- Pull graphs in status READY from the database.
- Create Schedulers for each Graph.
- Populate the queue of the Jobs.
- Distribute Jobs accross Workers.
- Keep track of Job’s statuses.
- Process CANCEL requests.
- Update Graph’s statuses.
- Track worker status and last response.