Skip to content

Commit a1d3efe

Browse files
committed
Punt on get_activity_handle
1 parent 3d908d6 commit a1d3efe

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

temporalio/client.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,23 +1382,19 @@ async def count_activities(
13821382
# Issues a workflowservice CountActivityExecutions call
13831383
raise NotImplementedError
13841384

1385+
# TODO: this name is so simple/generic that users will expect it to work for workflow activities
1386+
# also. If we support both, we need to decide how to arrange the activity handle classes.
13851387
async def get_activity_handle(
13861388
self,
13871389
activity_id: str,
13881390
*,
1389-
workflow_id: Optional[str] = None,
13901391
run_id: Optional[str] = None,
1391-
task_token: Optional[bytes] = None,
13921392
) -> ActivityHandle[Any]:
1393-
"""Get a handle to an existing activity.
1393+
"""Get a handle to a standalone activity.
13941394
13951395
Args:
13961396
activity_id: The activity ID.
1397-
workflow_id: The workflow ID if the activity was started from a workflow.
13981397
run_id: The run ID. If not provided, targets the latest run.
1399-
task_token: Optional task token for the activity if the activity was
1400-
started from a workflow. Cannot be set if any of the id parameters
1401-
are set.
14021398
14031399
Returns:
14041400
A handle to the activity.
@@ -3113,6 +3109,9 @@ def __init__(
31133109
self._id_or_token = id_or_token
31143110

31153111

3112+
WorkflowActivityHandle = AsyncActivityHandle
3113+
3114+
31163115
# TODO: in the future when messages can be sent to activities, we will want the activity handle to
31173116
# be generic in the activity type in addition to the return type (as WorkflowHandle), to support
31183117
# static type inference for signal/query/update.

0 commit comments

Comments
 (0)