Package obitools :: Package parallel :: Module jobqueue :: Class Job
[hide private]
[frames] | no frames]

Class Job

source code


Instance Methods [hide private]
 
__init__(self, pool=None, function=None, *args, **kwargs)
Create a new job
source code
float
runScore(self)
Returns: the score used to ordonnance job in the queue
source code
 
__call__(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, pool=None, function=None, *args, **kwargs)
(Constructor)

source code 

Create a new job

Parameters:
  • pool (JobPool instance) - the jobpool used to run job. Can be None to not execute the job immediately.
  • function (callable object) - the function to run for the job
  • args - parametters for function call
  • kwargs - named parametters for function call
Overrides: object.__init__

Precondition: function cannot be None

runScore(self)

source code 
Returns: float
the score used to ordonnance job in the queue