Skip to content

Commit 07562cb

Browse files
committed
Make update poll loop termination condition consistent
1 parent 74309f5 commit 07562cb

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

temporalio/client.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5758,8 +5758,7 @@ async def start_workflow_update(
57585758
except asyncio.CancelledError as err:
57595759
raise WorkflowUpdateRPCTimeoutOrCancelledError() from err
57605760
if (
5761-
resp.stage >= req.wait_policy.lifecycle_stage
5762-
or resp.stage
5761+
resp.stage
57635762
>= temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED
57645763
):
57655764
break
@@ -5899,9 +5898,7 @@ async def start_workflow_update_with_start(
58995898
update_response.outcome if update_response.HasField("outcome") else None
59005899
)
59015900
if (
5902-
update_response.stage >= update_req.wait_policy.lifecycle_stage
5903-
# TODO: check this: for a wait_stage=Completed request should we continue polling here?
5904-
or update_response.stage
5901+
update_response.stage
59055902
>= temporalio.api.enums.v1.UpdateWorkflowExecutionLifecycleStage.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED
59065903
):
59075904
break

0 commit comments

Comments
 (0)