SPRAAK
|
Defines a task that calls a python function. More...
Public Member Functions | |
def | __init__ |
Constructor. More... | |
def | __str__ |
Returns a string representation of the task. More... | |
def | run |
Execute the task. More... | |
def | scanForResources |
Scans for resources needed by this task. More... | |
def | postScan |
Hook for tasks that want to do some extra flagging of resources, eg marking versions as deleted. More... | |
![]() | |
def | __init__ |
Constructor. More... | |
def | setCompleted |
def | isCompleted |
def | getName |
Return the name of this task. More... | |
def | setName |
Set the name of this task. More... | |
def | scanForResources |
Abstract method. More... | |
def | checkResourcesAvailable |
Checks if all the resources needed to run this task are available. More... | |
def | markResourcesAvailable |
Mark all resources used by this task as available. More... | |
def | run |
Abstract method. More... | |
def | canRunRemote |
Indicates if this task can be run remotely. More... | |
def | __str__ |
Returns a string representation of the task. More... | |
Defines a task that calls a python function.
def spr_pylib.train.task.PyTask.__init__ | ( | self, | |
in_fnames, | |||
out_fnames, | |||
func, | |||
arg, | |||
kwarg | |||
) |
Constructor.
self | The callee object. |
in_fnames | A list of file names that will be used as inputs for the task. |
out_fnames | A list of file names that will be used as outputs for the task. |
func | The function to be called. |
*arg | The positional arguments for the function call. |
**kwarg | The keyword arguments for the function call. |
def spr_pylib.train.task.PyTask.__str__ | ( | self | ) |
Returns a string representation of the task.
def spr_pylib.train.task.PyTask.run | ( | self, | |
host = None |
|||
) |
Execute the task.
No remote execution supported for now.
def spr_pylib.train.task.PyTask.scanForResources | ( | self, | |
resource_list | |||
) |
Scans for resources needed by this task.
self | The callee object. |
resource_list | The resource list with all registered resources. |
def spr_pylib.train.task.PyTask.postScan | ( | self | ) |
Hook for tasks that want to do some extra flagging of resources, eg marking versions as deleted.