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.
Worker listens for the new tasks from :py:class:`retask.Queueu`
associated with its group_id
:param Bunch opts: backend config :param queue:
(:py:class:`multiprocessing.Queue`) queue to announce new events :param
int worker_num: worker number :param int group_id: group_id from the set
of groups defined in config :param callback: callback object to handle
internal workers events. Should implement method ``log(msg)``. :param
lock: (:py:class:`multiprocessing.Lock`) global backend lock
|
__init__(self,
opts,
events,
worker_num,
group_id,
callback=None,
lock=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
event(self,
topic,
template,
content=None)
Multi-purpose logging method. |
source code
|
|
|
_announce_start(self,
job)
Announce everywhere that a build process started now. |
source code
|
|
|
_announce_end(self,
job)
Announce everywhere that a build process ended now. |
source code
|
|
|
|
|
|
|
|
|
|
|
terminate_instance(self)
Call the terminate playbook to destroy the building instance |
source code
|
|
|
mark_started(self,
job)
Send data about started build to the frontend |
source code
|
|
|
return_results(self,
job)
Send the build results to the frontend |
source code
|
|
|
|
|
|
|
init_fedmsg(self)
Initialize Fedmsg (this assumes there are certs and a fedmsg config
on disk) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
run(self)
Worker should startup and check if it can function for each job it
takes from the jobs queue run opts.setup_playbook to create the
instance do the build (mockremote) terminate the instance. |
source code
|
|
Inherited from multiprocessing.process.Process :
__repr__ ,
is_alive ,
join ,
start ,
terminate
Inherited from multiprocessing.process.Process (private):
_bootstrap
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|