Temporalex.Activity.Context (Temporalex v0.2.0)

Copy Markdown View Source

Context for a running activity task.

Stored in the process dictionary and accessible via current/0. Provides heartbeat/1 for long-running activities and cancelled?/0 for checking cancellation.

Summary

Functions

Check if the activity has been cancelled.

Get the current activity context from the process dictionary.

Send a heartbeat for the current activity. The Core SDK handles throttling.

Functions

cancelled?()

Check if the activity has been cancelled.

current()

Get the current activity context from the process dictionary.

heartbeat(details \\ nil)

Send a heartbeat for the current activity. The Core SDK handles throttling.

Returns :ok or {:cancelled, reason} if the activity has been cancelled.