class documentation

class NexusOperationCancellationType(IntEnum): (source)

View In Hierarchy

Defines behavior of a Nexus operation when the caller workflow initiates cancellation.

Pass one of these values to NexusClient.start_operation to define cancellation behavior.

To initiate cancellation, use NexusOperationHandle.cancel and then await the operation handle. This will result in a exceptions.NexusOperationError. The values of this enum define what is guaranteed to have happened by that point.

Constant ABANDON Do not send any cancellation request to the operation handler; just report cancellation to the caller
Constant TRY_CANCEL Send a cancellation request but immediately report cancellation to the caller. Note that this does not guarantee that cancellation is delivered to the operation handler if the caller exits before the delivery is done.
Constant WAIT_COMPLETED Send a cancellation request and wait for the operation to complete. Note that the operation may not complete as cancelled (for example, if it catches the asyncio.CancelledError resulting from the cancellation request).
Constant WAIT_REQUESTED Send a cancellation request and wait for confirmation that the request was received. Does not wait for the operation to complete.

Do not send any cancellation request to the operation handler; just report cancellation to the caller

Value
int(temporalio.bridge.proto.nexus.NexusOperationCancellationType.ABANDON)
TRY_CANCEL = (source)

Send a cancellation request but immediately report cancellation to the caller. Note that this does not guarantee that cancellation is delivered to the operation handler if the caller exits before the delivery is done.

Value
int(temporalio.bridge.proto.nexus.NexusOperationCancellationType.TRY_CANCEL)
WAIT_COMPLETED = (source)

Send a cancellation request and wait for the operation to complete. Note that the operation may not complete as cancelled (for example, if it catches the asyncio.CancelledError resulting from the cancellation request).

Value
int(temporalio.bridge.proto.nexus.NexusOperationCancellationType.WAIT_CANCELLATION_COMPLETED
)
WAIT_REQUESTED = (source)

Send a cancellation request and wait for confirmation that the request was received. Does not wait for the operation to complete.

Value
int(temporalio.bridge.proto.nexus.NexusOperationCancellationType.WAIT_CANCELLATION_REQUESTED
)