backend.daemons.job_grab¶
-
class
backend.daemons.job_grab.
CoprJobGrab
(opts)[source]¶ Fetch jobs from the Frontend
- submit build task to the jobs queue for workers
- run Action handler for action tasks
Parameters: - opts (Munch) – backend config
- lock –
multiprocessing.Lock
global backend lock
TODO: Not yet fully ready for config reload.
-
listen_to_pubsub
()[source]¶ Listens for job reschedule queries. Spawns self.ps_thread, don’t forget to stop it.
-
route_build_task
(task)[source]¶ Route build task to the appropriate queue. :param task: dict-like object which represent build task
Utilized task keys:
task_id
chroot
arch
Return int: Count of the successfully routed tasks