schrodinger.tasks.tasks module

class schrodinger.tasks.tasks.Status

Bases: object

NONE = '-'
NOT_READY = 'Not ready'
READY = 'Ready'
RUNNING = 'Running'
FAILED = 'Failed'
DONE = 'Done'
ERROR = 'Error'
class schrodinger.tasks.tasks.AbstractTask(reporter=None, *args, **kwargs)

Bases: schrodinger.ui.qt.appframework2.validation.ValidationMixin, schrodinger.models.parameters.ParamModel

WARNING: as descriptors, instances of this class will not behave normally if used as class variables.

base_name
name
status_param
statusChanged
getName()
start()

Start this task. This includes any preprocessing and validation checks. Any failures will prevent the task from running.

reportValidation(results)

This method is required by ValidationMixin. In order to report errors, a reporter object is required (self._reporter). If no reporter is specified, a RuntimeError is raised for any validation errors that are encountered, but good results will allow the task to proceed; warnings are ignored if there is no reporter.

preProcess()
preValidate()

Override this method for any operations that should be run prior to validation.

postStart()

Override this method for any operations that should be run immediately after a task is started. This method is only called if the task was successfully started; returning False from this method provides one last way of marking the task as having failed to start.

isRunning()
status()
setStatus(status)
base_nameChanged
nameChanged
status_paramChanged
class schrodinger.tasks.tasks.BaseFunctionTask(reporter=None, *args, **kwargs)

Bases: schrodinger.tasks.tasks.AbstractTask

runMain()
class schrodinger.tasks.tasks.BlockingFunctionTask(reporter=None, *args, **kwargs)

Bases: schrodinger.tasks.tasks.BaseFunctionTask

isRunning()
class schrodinger.tasks.tasks.ThreadFunctionTask(*args, **kwargs)

Bases: schrodinger.tasks.tasks.BaseFunctionTask

guardedRunMain()
wait()

Process events until this task is no longer running, then return. If the task is not running when this is called, it wil return immediately.

onThreadFinished()
isRunning()