Skip to content

Commit

Permalink
Mark local activities as experimental (#252)
Browse files Browse the repository at this point in the history
Fixes #246
  • Loading branch information
cretz committed Jan 13, 2023
1 parent fdf8b65 commit 1a260c3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ Some things to note about the above code:
capabilities are needed.
* Local activities work very similarly except the functions are `workflow.start_local_activity()` and
`workflow.execute_local_activity()`
* ⚠️Local activities are currently experimental
* Activities can be methods of a class. Invokers should use `workflow.start_activity_method()`,
`workflow.execute_activity_method()`, `workflow.start_local_activity_method()`, and
`workflow.execute_local_activity_method()` instead.
Expand Down
18 changes: 18 additions & 0 deletions temporalio/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2197,6 +2197,9 @@ def start_local_activity(
At least one of ``schedule_to_close_timeout`` or ``start_to_close_timeout``
must be present.
.. warning::
Local activities are currently experimental.
Args:
activity: Activity name or function reference.
arg: Single argument to the activity.
Expand Down Expand Up @@ -2365,6 +2368,9 @@ async def execute_local_activity(
"""Start a local activity and wait for completion.
This is a shortcut for ``await`` :py:meth:`start_local_activity`.
.. warning::
Local activities are currently experimental.
"""
# We call the runtime directly instead of top-level start_local_activity to
# ensure we don't miss new parameters
Expand Down Expand Up @@ -2497,6 +2503,9 @@ def start_local_activity_class(
"""Start a local activity from a callable class.
See :py:meth:`start_local_activity` for parameter and return details.
.. warning::
Local activities are currently experimental.
"""
return _Runtime.current().workflow_start_local_activity(
activity,
Expand Down Expand Up @@ -2627,6 +2636,9 @@ async def execute_local_activity_class(
"""Start a local activity from a callable class and wait for completion.
This is a shortcut for ``await`` :py:meth:`start_local_activity_class`.
.. warning::
Local activities are currently experimental.
"""
# We call the runtime directly instead of top-level start_local_activity to
# ensure we don't miss new parameters
Expand Down Expand Up @@ -2759,6 +2771,9 @@ def start_local_activity_method(
"""Start a local activity from a method.
See :py:meth:`start_local_activity` for parameter and return details.
.. warning::
Local activities are currently experimental.
"""
return _Runtime.current().workflow_start_local_activity(
activity,
Expand Down Expand Up @@ -2889,6 +2904,9 @@ async def execute_local_activity_method(
"""Start a local activity from a method and wait for completion.
This is a shortcut for ``await`` :py:meth:`start_local_activity_method`.
.. warning::
Local activities are currently experimental.
"""
# We call the runtime directly instead of top-level start_local_activity to
# ensure we don't miss new parameters
Expand Down

0 comments on commit 1a260c3

Please sign in to comment.