Package backend :: Package daemons :: Module job_grab :: Class CoprJobGrab
[hide private]
[frames] | no frames]

Class CoprJobGrab

source code



Fetch jobs from the Frontend

    - submit build task to the jobs queue for workers
    - run Action handler for action tasks


:param Bunch opts: backend config
:param events: :py:class:`multiprocessing.Queue` to listen
    for events from other backend components
:param lock: :py:class:`multiprocessing.Lock` global backend lock

Instance Methods [hide private]
 
__init__(self, opts, events, lock)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
connect_queues(self)
Connects to the retask queues.
source code
 
event(self, what)
Put new event into the event queue
source code
 
process_build_task(self, task)
Route build task to the appropriate queue.
source code
 
process_action(self, action)
Run action task handler, see :py:class:`~backend.action.Action`
source code
 
load_tasks(self)
Retrieve tasks from frontend and runs appropriate handlers
source code
 
run(self)
Starts job grabber process
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__

Class Variables [hide private]

Inherited from multiprocessing.process.Process (private): _Popen

Properties [hide private]

Inherited from multiprocessing.process.Process: authkey, daemon, exitcode, ident, name, pid

Inherited from object: __class__

Method Details [hide private]

__init__(self, opts, events, lock)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

connect_queues(self)

source code 

Connects to the retask queues. One queue per builders group.

event(self, what)

source code 

Put new event into the event queue

:param what: message to put into the queue

process_build_task(self, task)

source code 

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(self, action)

source code 

Run action task handler, see :py:class:`~backend.action.Action`

:param action: dict-like object with action task

run(self)

source code 

Starts job grabber process

Overrides: multiprocessing.process.Process.run