Manager for computational tasks.
A TaskManager accepts task requests and hands them out to other
processes. It stores the results that can then be picked up by the
requester. A TaskManager also keeps track of its compute processes. If a
process disappears, its running tasks are re-scheduled for execution by
another compute process. TaskManangers are thread-safe.
|
|
str
|
activeProcessInfo(self,
pid)
Returns:
information about the active process number pid |
|
|
str
|
addTaskRequest(self,
tag,
parameters,
process_id=None)
Returns:
the task id |
|
|
|
|
tuple
Returns the result of an arbitrary finished task. The task is
removed from the list of finished tasks.
|
getAnyResult(self)
Returns:
the task id, the task tag, and the result of the task |
|
|
tuple
Returns a waiting task of arbitrary tag. The task is removed from
the list of waiting tasks and added to the list of running tasks.
|
getAnyTask(self,
process_id=None)
Returns:
the task id, the task tag, and the parameters |
|
|
tuple
Returns the result of a finished task that has the given tag. The
task is removed from the list of finished tasks.
|
|
tuple
Returns a waiting task with the given tag. The task is removed
from the list of waiting tasks and added to the list of running
tasks.
|
getTaskWithTag(self,
tag,
process_id=None)
Returns:
the task id and the parameters |
|
|
int
|
|
tuple
|
numberOfTasks(self)
Returns:
a tuple of dictionaries containing the number of waiting tasks, the
number of running tasks, and the number of results waiting to be
retrieved. |
|
|
|
|
int
Registers a process with the task manager. All processes must call
this method before making any other task manager calls.
|
registerProcess(self,
watchdog_period=None,
info=None)
Returns:
a unique process id |
|
|
|
|
|
|
|
|
|
|
|
|
|
terminate(self)
Signals that no more tasks or results will be requested. |
|
|
|
|
Inherited from Pyro.core.ObjBase :
GUID ,
Pyro_dyncall ,
delegateTo ,
getAttrProxy ,
getDaemon ,
getLocalStorage ,
getProxy ,
remote_retrieve_code ,
remote_supply_code ,
setCodeValidator ,
setDaemon ,
setGUID
|