class documentation

class Worker: (source)

View In Hierarchy

SDK Core worker.

Static Method create Create a bridge worker from a bridge client.
Static Method for_replay Create a bridge replay worker.
Method __init__ Create SDK core worker from a bridge worker.
Async Method complete_activity_task Complete an activity task.
Async Method complete_workflow_activation Complete a workflow activation.
Async Method finalize_shutdown Finalize the worker.
Async Method poll_activity_task Poll for an activity task.
Async Method poll_workflow_activation Poll for a workflow activation.
Method record_activity_heartbeat Record an activity heartbeat.
Method request_workflow_eviction Request a workflow be evicted.
Async Method shutdown Shutdown the worker, waiting for completion.
Instance Variable _ref Undocumented

Create a bridge worker from a bridge client.

@staticmethod
def for_replay(runtime: temporalio.bridge.runtime.Runtime, config: WorkerConfig) -> Tuple[Worker, temporalio.bridge.temporal_sdk_bridge.HistoryPusher]: (source)

Create a bridge replay worker.

def __init__(self, ref: temporalio.bridge.temporal_sdk_bridge.WorkerRef): (source)

Create SDK core worker from a bridge worker.

async def complete_activity_task(self, comp: temporalio.bridge.proto.ActivityTaskCompletion): (source)

Complete an activity task.

Complete a workflow activation.

async def finalize_shutdown(self): (source)

Finalize the worker.

This will fail if shutdown hasn't completed fully due to internal reference count checks.

Poll for an activity task.

Poll for a workflow activation.

def record_activity_heartbeat(self, comp: temporalio.bridge.proto.ActivityHeartbeat): (source)

Record an activity heartbeat.

def request_workflow_eviction(self, run_id: str): (source)

Request a workflow be evicted.

async def shutdown(self): (source)

Shutdown the worker, waiting for completion.

Undocumented