Activity Context manager.
Context.current() from Activity code in order to send heartbeats and get notified of Activity cancellation.
AbortSignal which can be used to cancel requests on Activity cancellation.
Await this promise in an Activity to get notified of cancellation.
This promise will never be resolved, it will only be rejected with a CancelledFailure.
Holds information about the current executing Activity.
Send a heartbeat from an Activity.
If an Activity times out, the last value of details is included in the ActivityFailure delivered to a Workflow in the
cause attribute which will be set to TimeoutFailure. Then the Workflow can pass the details to the next Activity invocation. This acts as a periodic checkpoint mechanism for the progress of an Activity.
The Activity must heartbeat in order to receive cancellation.
Helper function for sleeping in an Activity.
|sleep duration - ms formatted string or number of milliseconds|
a Promise that either resolves when deadline is reached or rejects when the Context is cancelled
Gets the context of the current Activity.
Uses AsyncLocalStorage under the hood to make it accessible in nested callbacks and promises.