flowserv.controller.worker.code module
Execute a workflow code step.
- class flowserv.controller.worker.code.CodeWorker(identifier: Optional[str] = None, volume: Optional[str] = None)
Bases:
flowserv.controller.worker.base.WorkerWorker to execute workflow steps of type
flowserv.model.workflow.step.CodeStep- exec(step: flowserv.model.workflow.step.CodeStep, context: Dict, store: flowserv.volume.fs.FileSystemStorage) flowserv.controller.serial.workflow.result.ExecResult
Execute a workflow step of type
flowserv.model.workflow.step.CodeStepin a given context.Captures output to STDOUT and STDERR and includes them in the returned execution result.
Note that the code worker expects a file system storage volume.
- Parameters
step (flowserv.model.workflow.step.CodeStep) – Code step in a serial workflow.
context (dict) – Context for the executed code.
store (flowserv.volume.fs.FileSystemStorage) – Storage volume that contains the workflow run files.
- Return type