Skip to content

Commit

Permalink
Make interceptor name match client call name
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Dec 18, 2024
1 parent cdffda0 commit ae6acec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions temporalio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ def on_start_failure(
_on_start_error=on_start_failure,
)

return await self._impl.start_workflow_update_with_start_workflow(input)
return await self._impl.start_update_with_start_workflow(input)

def list_workflows(
self,
Expand Down Expand Up @@ -5562,11 +5562,11 @@ async def start_workflow_update(
"""Called for every :py:meth:`WorkflowHandle.update` and :py:meth:`WorkflowHandle.start_update` call."""
return await self.next.start_workflow_update(input)

async def start_workflow_update_with_start_workflow(
async def start_update_with_start_workflow(
self, input: StartWorkflowUpdateWithStartInput
) -> WorkflowUpdateHandle[Any]:
"""Called for every :py:meth:`Client.start_update_with_start` and :py:meth:`Client.execute_update_with_start` call."""
return await self.next.start_workflow_update_with_start_workflow(input)
return await self.next.start_update_with_start_workflow(input)

### Async activity calls

Expand Down Expand Up @@ -6032,7 +6032,7 @@ async def _build_update_workflow_execution_request(
)
return req

async def start_workflow_update_with_start_workflow(
async def start_update_with_start_workflow(
self, input: StartWorkflowUpdateWithStartInput
) -> WorkflowUpdateHandle[Any]:
seen_start = False
Expand Down
4 changes: 2 additions & 2 deletions tests/worker/test_update_with_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,12 +469,12 @@ class SimpleClientOutboundInterceptor(OutboundInterceptor):
def __init__(self, next: OutboundInterceptor) -> None:
super().__init__(next)

async def start_workflow_update_with_start_workflow(
async def start_update_with_start_workflow(
self, input: StartWorkflowUpdateWithStartInput
) -> WorkflowUpdateHandle[Any]:
input.start_workflow_input.args = ["intercepted-workflow-arg"]
input.update_workflow_input.args = ["intercepted-update-arg"]
return await super().start_workflow_update_with_start_workflow(input)
return await super().start_update_with_start_workflow(input)


@workflow.defn
Expand Down

0 comments on commit ae6acec

Please sign in to comment.