Skip to content

Commit 23df3f8

Browse files
committed
Punt on get_activity_handle
1 parent fba7c1a commit 23df3f8

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
@@ -1383,23 +1383,19 @@ async def count_activities(
13831383
# Issues a workflowservice CountActivityExecutions call
13841384
raise NotImplementedError
13851385

1386+
# TODO: this name is so simple/generic that users will expect it to work for workflow activities
1387+
# also. If we support both, we need to decide how to arrange the activity handle classes.
13861388
async def get_activity_handle(
13871389
self,
13881390
activity_id: str,
13891391
*,
1390-
workflow_id: Optional[str] = None,
13911392
run_id: Optional[str] = None,
1392-
task_token: Optional[bytes] = None,
13931393
) -> ActivityHandle[Any]:
1394-
"""Get a handle to an existing activity.
1394+
"""Get a handle to a standalone activity.
13951395
13961396
Args:
13971397
activity_id: The activity ID.
1398-
workflow_id: The workflow ID if the activity was started from a workflow.
13991398
run_id: The run ID. If not provided, targets the latest run.
1400-
task_token: Optional task token for the activity if the activity was
1401-
started from a workflow. Cannot be set if any of the id parameters
1402-
are set.
14031399
14041400
Returns:
14051401
A handle to the activity.
@@ -3114,6 +3110,9 @@ def __init__(
31143110
self._id_or_token = id_or_token
31153111

31163112

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

0 commit comments

Comments
 (0)