SPRAAK
|
Defines the base class of all tasks. More...
Public Member Functions | |
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 the base class of all tasks.
def spr_pylib.train.task.Task.__init__ | ( | self | ) |
Constructor.
self | The callee object. |
def spr_pylib.train.task.Task.setCompleted | ( | self, | |
completed = True |
|||
) |
def spr_pylib.train.task.Task.isCompleted | ( | self | ) |
def spr_pylib.train.task.Task.getName | ( | self | ) |
Return the name of this task.
self | The callee object. |
def spr_pylib.train.task.Task.setName | ( | self, | |
name | |||
) |
Set the name of this task.
self | The callee object. |
name | The new name of the task. |
def spr_pylib.train.task.Task.scanForResources | ( | self, | |
resource_list | |||
) |
Abstract method.
Checks resource usage of the task.
Checks if this task uses resources already defined in resource_list
. If a resource is already defined, update it to indicate that this task is another consumer. If not defined, create and register the new resource.
self | The callee object. |
resource_list | The resource list holding all registered resources. Will be updated when needed. |
def spr_pylib.train.task.Task.checkResourcesAvailable | ( | self | ) |
Checks if all the resources needed to run this task are available.
True
if all resources are available.self | The callee object. |
def spr_pylib.train.task.Task.markResourcesAvailable | ( | self | ) |
Mark all resources used by this task as available.
self | The callee object. |
def spr_pylib.train.task.Task.run | ( | self, | |
host = None |
|||
) |
Abstract method.
Execute the task.
self | The callee object. |
host | An optional host name. If given, an atempt will be made to run the task remotely. |
def spr_pylib.train.task.Task.canRunRemote | ( | self | ) |
Indicates if this task can be run remotely.
True
if the task can be run remotely.self | The callee object. |
def spr_pylib.train.task.Task.__str__ | ( | self | ) |
Returns a string representation of the task.
self | The callee object. |