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
  • lockmultiprocessing.Lock global backend lock

TODO: Not yet fully ready for config reload.

group(arch)[source]
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
process_action(action)[source]

Run action task handler, see Action

Parameters:action – dict-like object with action task
load_tasks()[source]

Retrieve tasks from frontend and runs appropriate handlers

on_pubsub_event(raw)[source]
log_queue_info()[source]
init_internal_structures()[source]
handle_control_channel()[source]
run()[source]

Starts job grabber process

terminate()[source]

Previous topic

backend.daemons.dispatcher

Next topic

backend.daemons.log

This Page