Skip to content

Commit

Permalink
Fix event name
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Duiker <[email protected]>
  • Loading branch information
marcduiker committed Feb 12, 2025
1 parent 4518267 commit 741257f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions workflows/python/sdk/order-processor/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def prompt_for_approval(wfClient: DaprWorkflowClient):
if state.runtime_status.name == "COMPLETED":
return
if approved.lower() == "y":
wfClient.raise_workflow_event(instance_id=_id, event_name="manager_approval", data={'approval': True})
wfClient.raise_workflow_event(instance_id=_id, event_name="approval_event", data={'approval': True})
else:
wfClient.raise_workflow_event(instance_id=_id, event_name="manager_approval", data={'approval': False})
wfClient.raise_workflow_event(instance_id=_id, event_name="approval_event", data={'approval': False})
## Additionally, you would need to import signal and define timeout_error:
# import signal
Expand All @@ -70,7 +70,7 @@ def prompt_for_approval(wfClient: DaprWorkflowClient):
# signal.signal(signal.SIGALRM, timeout_error)
"""
wfClient.raise_workflow_event(instance_id=_id, event_name="manager_approval", data={'approval': True})
wfClient.raise_workflow_event(instance_id=_id, event_name="approval_event", data={'approval': True})

approval_seeked = False
start_time = datetime.now()
Expand Down

0 comments on commit 741257f

Please sign in to comment.