temporalio.worker.WorkflowRunner
@abstractmethod
def create_instance(self, det: WorkflowInstanceDetails) -> WorkflowInstance:
(source)
¶
overridden in temporalio.worker.UnsandboxedWorkflowRunner, temporalio.worker.workflow_sandbox.SandboxedWorkflowRunner
Create a workflow instance that can handle activations.
| Parameters | |
det:WorkflowInstanceDetails | Details that can be used to create the instance. |
| Returns | |
WorkflowInstance | Workflow instance that can handle activations. |
@abstractmethod
def prepare_workflow(self, defn: temporalio.workflow._Definition):
(source)
¶
overridden in temporalio.worker.UnsandboxedWorkflowRunner, temporalio.worker.workflow_sandbox.SandboxedWorkflowRunner
Prepare a workflow for future execution.
This is run once for each workflow definition when a worker starts. This allows the runner to do anything necessarily to prepare for this definition to be used multiple times in create_instance.
| Parameters | |
defn:temporalio.workflow._Definition | The workflow definition. |
def set_worker_level_failure_exception_types(self, types: Sequence[):
(source)
¶
Set worker-level failure exception types that will be used to validate in the sandbox when calling prepare_workflow.
| Parameters | |
types:Sequence[ | Exception types. |