class documentation
class _ActivityWorker: (source)
Constructor: _ActivityWorker(bridge_worker, task_queue, activities, activity_executor, ...)
Undocumented
Method | __init__ |
Undocumented |
Method | assert |
Undocumented |
Async Method | drain |
Undocumented |
Method | notify |
Undocumented |
Async Method | run |
Continually poll for activity tasks and dispatch to handlers. |
Async Method | wait |
Undocumented |
Async Method | _execute |
Invoke the user's activity function. |
Method | _handle |
Request cancellation of a running activity task. |
Async Method | _handle |
Handle a start activity task. |
Method | _heartbeat |
Undocumented |
Async Method | _heartbeat |
Undocumented |
Instance Variable | _activities |
Undocumented |
Instance Variable | _activity |
Undocumented |
Instance Variable | _bridge |
Undocumented |
Instance Variable | _data |
Undocumented |
Instance Variable | _dynamic |
Undocumented |
Instance Variable | _encode |
Undocumented |
Instance Variable | _fail |
Undocumented |
Instance Variable | _interceptors |
Undocumented |
Instance Variable | _metric |
Undocumented |
Instance Variable | _running |
Undocumented |
Instance Variable | _seen |
Undocumented |
Instance Variable | _shared |
Undocumented |
Instance Variable | _task |
Undocumented |
Instance Variable | _worker |
Undocumented |
def __init__(self, *, bridge_worker:
Callable[ [], temporalio.bridge.worker.Worker]
, task_queue: str
, activities: Sequence[ Callable]
, activity_executor: concurrent.futures.Executor | None
, shared_state_manager: SharedStateManager | None
, data_converter: temporalio.converter.DataConverter
, interceptors: Sequence[ Interceptor]
, metric_meter: temporalio.common.MetricMeter
, encode_headers: bool
):
(source)
¶
Undocumented
async def _execute_activity(self, start:
temporalio.bridge.proto.activity_task.Start
, running_activity: _RunningActivity
, task_token: bytes
) -> Any
:
(source)
¶
Invoke the user's activity function.
Exceptions are handled by a caller of this function.
def _handle_cancel_activity_task(self, task_token:
bytes
, cancel: temporalio.bridge.proto.activity_task.Cancel
):
(source)
¶
Request cancellation of a running activity task.
async def _handle_start_activity_task(self, task_token:
bytes
, start: temporalio.bridge.proto.activity_task.Start
, running_activity: _RunningActivity
):
(source)
¶
Handle a start activity task.
Attempt to execute the user activity function and invoke the data converter on the result. Handle errors and send the task completion.
async def _heartbeat_async(self, logger:
logging.LoggerAdapter
, activity: _RunningActivity
, task_token: bytes
):
(source)
¶
Undocumented