backend.daemons.dispatcher

class backend.daemons.dispatcher.Worker(opts, frontend_client, worker_num, group_id)[source]

Worker process dispatches building tasks. Backend spin-up multiple workers, each worker associated to one group_id and process one task at the each moment.

Parameters:
  • opts (Munch) – backend config
  • worker_num (int) – worker number
  • group_id (int) – group_id from the set of groups defined in config
logger_name[source]
group_name[source]
fedmsg_notify(topic, template, content=None)[source]

Publish message to fedmsg bus when it is available :param topic: :param template: :param content:

_announce_start(job)[source]

Announce everywhere that a build process started now.

_announce_end(job)[source]

Announce everywhere that a build process ended now.

mark_started(job)[source]

Send data about started build to the frontend

return_results(job)[source]

Send the build results to the frontend

starting_build(job)[source]

Announce to the frontend that a build is starting. Checks if we can and/or should start job

Return True:if the build can start
Return False:if the build can not start (build is cancelled)
classmethod pkg_built_before(pkg, chroot, destdir)[source]

Check whether the package has already been built in this chroot.

init_fedmsg()[source]

Initialize Fedmsg (this assumes there are certs and a fedmsg config on disk)

obtain_job()[source]

Retrieves new build task from queue. Checks if the new job can be started and not skipped.

do_job(job)[source]

Executes new job.

Parameters:jobBuildJob
copy_mock_logs(job)[source]
clean_result_directory(job)[source]

Create backup directory and move there results from previous build.

update_process_title(suffix=None)[source]
notify_job_grab_about_task_end(job, do_reschedule=False)[source]
acquire_vm_for_job(job)[source]
run_cycle()[source]
run()[source]

Previous topic

backend.daemons.backend

Next topic

backend.daemons.job_grab

This Page