temporalio.workflow.unsafe

Contains static methods that should not normally be called during workflow execution except in advanced cases.

Static Method current_import_notification_policy_override Gets the current import notification policy override if one is set.
Static Method imports_passed_through Context manager to mark all imports that occur within it as passed through (meaning not reloaded by the sandbox).
Static Method in_sandbox Whether the code is executing on a sandboxed thread.
Static Method is_imports_passed_through Whether the current block of code is in imports_passed_through.
Static Method is_read_only Whether the workflow is currently in read-only mode.
Static Method is_replaying Whether the workflow is currently replaying.
Static Method is_replaying_history_events Whether the workflow is replaying history events.
Static Method is_sandbox_unrestricted Whether the current block of code is not restricted via sandbox.
Static Method sandbox_import_notification_policy Context manager to apply the given import notification policy.
Static Method sandbox_unrestricted A context manager to run code without sandbox restrictions.
Method __init__ Undocumented
Static Method _set_in_sandbox Undocumented

Gets the current import notification policy override if one is set.

Context manager to mark all imports that occur within it as passed through (meaning not reloaded by the sandbox).

Whether the code is executing on a sandboxed thread.

Returns
boolTrue if the code is executing in the sandbox thread.

Whether the current block of code is in imports_passed_through.

Returns
boolTrue if the current code's imports will be passed through

Whether the workflow is currently in read-only mode.

Read-only mode occurs during queries and update validators where side effects are not allowed.

Returns
boolTrue if the workflow is in read-only mode, False otherwise.

Whether the workflow is currently replaying.

This includes queries and update validators that occur during replay.

Returns
boolTrue if the workflow is currently replaying

Whether the workflow is replaying history events.

This excludes queries and update validators, which are live operations.

Returns
boolTrue if replaying history events, False otherwise.

Whether the current block of code is not restricted via sandbox.

Returns
boolTrue if the current code is not restricted in the sandbox.

Context manager to apply the given import notification policy.

A context manager to run code without sandbox restrictions.