new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

Temporal · Develop · all subjects

nexus cancellation

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Nexus Python SDK - cancellation types

Four cancellation types control how the caller reacts to cancellation: ABANDON (do not request cancellation), TRY_CANCEL (initiate request and immediately report cancellation, no guarantee delivery), WAIT_REQUESTED (request cancellation and wait for confirmation of receipt, not for actual cancellation), WAIT_COMPLETED (wait for operation completion, may or may not complete as cancelled). Default is WAIT_COMPLETED. Set cancellation_type when starting or executing an operation.

Nexus Python SDK - cancel operation from workflow

Call handle.cancel() on the operation handle to cancel a Nexus Operation from within a Workflow. Only asynchronous operations can be canceled in Nexus since cancellation is sent using an operation token. The Workflow or backing resources may choose to ignore the cancellation request.

Nexus Python SDK - operation completion after workflow exit

Once the caller Workflow completes, the caller's Nexus Machinery will not make any further attempts to cancel operations that are still running. It is acceptable to leave operations running in some use cases. To ensure cancellations are delivered, wait for all pending operations to finish before exiting the Workflow.

Cancel Nexus Operations in Workflows

Nexus Operations execute within Cancellation Scopes. Requesting cancellation of a Cancellation Scope results in requesting cancellation for all cancellable operations owned by that scope. The Workflow itself defines the root Cancellation Scope. Requesting cancellation of the Workflow propagates the cancellation request to all cancellable operations started by that workflow, including Nexus Operations. To provide more granular control, create a new Cancellation Scope and start the Nexus Operation from within that scope.

Nexus Operation cancellation limitations

Only asynchronous operations can be canceled in Nexus, since cancellation is sent using an operation token. The Workflow or other resources backing the operation may choose to ignore the cancellation request. Once the caller Workflow completes, the caller's Nexus Machinery will not make any further attempts to cancel operations that are still running. To ensure cancellations are delivered, wait for all pending operations to finish before exiting the Workflow.

Give your agent this brain