class documentation

class ActivityExecutionDescription(ActivityExecution): (source)

View In Hierarchy

Detailed information about an activity execution not started by a workflow.

Method has_heartbeat_details True if heartbeat details are available. Use heartbeat_details to retrieve them.
Method has_input True if activity input is available. Use input to retrieve it.
Method has_last_failure True if last failure is available. Use last_failure to retrieve it.
Method has_outcome_failure True if activity outcome failure is available. Use outcome_failure to retrieve it.
Method has_result True if activity result is available. Use result to retrieve it.
Async Method heartbeat_details Returns details from the last heartbeat, or None if not available.
Async Method input Returns activity input, or None if not available.
Async Method last_failure Returns failure from the last failed attempt, or None if not available.
Async Method outcome_failure Returns activity outcome failure, or None if not available.
Async Method result Returns activity result, or None if not available.
Class Variable attempt Current attempt number.
Class Variable canceled_reason Reason for cancellation, if cancel was requested.
Class Variable close_time Time when the activity transitioned to a closed state.
Class Variable current_retry_interval Time until the next retry, if applicable.
Class Variable data_converter Data converter used to convert raw payloads. By default it's the same as the client's data converter.
Class Variable expiration_time The time at which the activity's schedule-to-close timeout expires.
Class Variable heartbeat_timeout Configured heartbeat timeout of the activity.
Class Variable last_attempt_complete_time Time when the last attempt completed.
Class Variable last_deployment_version The Worker Deployment Version this activity was dispatched to most recently.
Class Variable last_heartbeat_time Time of the last heartbeat.
Class Variable last_started_time Time the last attempt was started.
Class Variable last_worker_identity Identity of the last worker that processed the activity.
Class Variable next_attempt_schedule_time Time when the next attempt will be scheduled.
Class Variable priority Priority metadata.
Class Variable raw_callbacks Underlying protobuf callbacks
Class Variable raw_info Underlying protobuf info.
Class Variable raw_input Raw input of the activity. Use input to decode.
Class Variable raw_outcome Raw outcome of the activity. Use result or outcome_failure to decode.
Class Variable retry_policy Retry policy for the activity.
Class Variable run_state More detailed breakdown if status is RUNNING.
Class Variable schedule_to_close_timeout Configured schedule-to-close timeout of the activity.
Class Variable schedule_to_start_timeout Configured schedule-to-start timeout of the activity.
Class Variable start_delay Time to wait before making the first activity task available for dispatch.
Class Variable start_to_close_timeout Configured start-to-close timeout of the activity.
Class Variable total_heartbeat_count Total number of heartbeats recorded across all attempts of this activity, including retries.
Class Method _from_resp Create from raw proto activity execution info.

Inherited from ActivityExecution:

Class Variable activity_id Activity ID.
Class Variable activity_run_id Run ID of the activity.
Class Variable activity_type Type name of the activity.
Class Variable execution_duration Duration from schedule to close time, only populated if closed.
Class Variable execution_time The time at which the first activity task is made available for dispatch, computed as schedule time + start delay.
Class Variable namespace Namespace of the activity (copied from calling client).
Class Variable schedule_time Time the activity was originally scheduled.
Class Variable status Current status of the activity.
Class Variable task_queue Task queue the activity was scheduled on.
Class Variable typed_search_attributes Current set of search attributes if any.
Class Method _from_raw_info Create from raw proto activity list info.
def has_heartbeat_details(self) -> bool: (source)

True if heartbeat details are available. Use heartbeat_details to retrieve them.

Always false if include_heartbeat_details was false in the ActivityHandle.describe call.

def has_input(self) -> bool: (source)

True if activity input is available. Use input to retrieve it.

Always false if include_input was false in the ActivityHandle.describe call.

def has_last_failure(self) -> bool: (source)

True if last failure is available. Use last_failure to retrieve it.

Always false if include_last_failure was false in the ActivityHandle.describe call.

def has_outcome_failure(self) -> bool: (source)

True if activity outcome failure is available. Use outcome_failure to retrieve it.

Activity outcome failure is only available if the activity has closed with a failure. Use last_failure to retrieve failure of the most recent failed attempt of an activity that's still running or that completed successfully. Always false if include_outcome was false in the ActivityHandle.describe call.

def has_result(self) -> bool: (source)

True if activity result is available. Use result to retrieve it.

Activity result is only available if the activity has completed and was successful. Always false if include_outcome was false in the ActivityHandle.describe call.

async def heartbeat_details(self, type_hints: list[type] | None = None) -> list[Any] | None: (source)

Returns details from the last heartbeat, or None if not available.

Always None if include_heartbeat_details was false in the ActivityHandle.describe call. Type hints can be provided to aid data conversion.

async def input(self, type_hints: list[type] | None = None) -> list[Any] | None: (source)

Returns activity input, or None if not available.

Always None if include_input was false in the ActivityHandle.describe call. Type hints can be provided to aid data conversion.

async def last_failure(self) -> BaseException | None: (source)

Returns failure from the last failed attempt, or None if not available.

Always None if include_last_failure was false in the ActivityHandle.describe call.

async def outcome_failure(self) -> BaseException | None: (source)

Returns activity outcome failure, or None if not available.

Activity outcome failure is only available if the activity has closed with a failure. Use last_failure to retrieve failure of the most recent failed attempt of an activity that's still running or that completed successfully. Always false if include_outcome was false in the ActivityHandle.describe call.

async def result(self, type_hint: type | None = None) -> Any | None: (source)

Returns activity result, or None if not available.

Activity result is only available if the activity has completed successfully. Always false if include_outcome was false in the ActivityHandle.describe call. Type hints can be provided to aid data conversion.

Current attempt number.

canceled_reason: str | None = (source)

Reason for cancellation, if cancel was requested.

Time when the activity transitioned to a closed state.

current_retry_interval: timedelta | None = (source)

Time until the next retry, if applicable.

data_converter: DataConverter = (source)

Data converter used to convert raw payloads. By default it's the same as the client's data converter.

expiration_time: datetime | None = (source)

The time at which the activity's schedule-to-close timeout expires.

heartbeat_timeout: timedelta | None = (source)

Configured heartbeat timeout of the activity.

last_attempt_complete_time: datetime | None = (source)

Time when the last attempt completed.

The Worker Deployment Version this activity was dispatched to most recently.

last_heartbeat_time: datetime | None = (source)

Time of the last heartbeat.

last_started_time: datetime | None = (source)

Time the last attempt was started.

last_worker_identity: str | None = (source)

Identity of the last worker that processed the activity.

next_attempt_schedule_time: datetime | None = (source)

Time when the next attempt will be scheduled.

Priority metadata.

Underlying protobuf callbacks

Raw input of the activity. Use input to decode.

Raw outcome of the activity. Use result or outcome_failure to decode.

Retry policy for the activity.

More detailed breakdown if status is RUNNING.

schedule_to_close_timeout: timedelta | None = (source)

Configured schedule-to-close timeout of the activity.

schedule_to_start_timeout: timedelta | None = (source)

Configured schedule-to-start timeout of the activity.

start_delay: timedelta | None = (source)

Time to wait before making the first activity task available for dispatch.

start_to_close_timeout: timedelta | None = (source)

Configured start-to-close timeout of the activity.

total_heartbeat_count: int = (source)

Total number of heartbeats recorded across all attempts of this activity, including retries.

Zero if the activity has not sent any heartbeats or if the server didn't report heartbeat count.

Create from raw proto activity execution info.