Skip to content

Commit af9443b

Browse files
authored
Update durable-functions-external-events.md
Fixed missing `yield` for Python sample code
1 parent 929afd4 commit af9443b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/azure-functions/durable/durable-functions-external-events.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import azure.functions as func
6262
import azure.durable_functions as df
6363

6464
def orchestrator_function(context: df.DurableOrchestrationContext):
65-
approved = context.wait_for_external_event('Approval')
65+
approved = yield context.wait_for_external_event('Approval')
6666
if approved:
6767
# approval granted - do the approved action
6868
else:
@@ -168,7 +168,7 @@ def orchestrator_function(context: df.DurableOrchestrationContext):
168168
event2 = context.wait_for_external_event('Event2')
169169
event3 = context.wait_for_external_event('Event3')
170170

171-
winner = context.task_any([event1, event2, event3])
171+
winner = yield context.task_any([event1, event2, event3])
172172
if winner == event1:
173173
# ...
174174
elif winner == event2:
@@ -423,4 +423,4 @@ In this case, the instance ID is hardcoded as *MyInstanceId*.
423423
> [Learn how to implement error handling](durable-functions-error-handling.md)
424424
425425
> [!div class="nextstepaction"]
426-
> [Run a sample that waits for human interaction](durable-functions-phone-verification.md)
426+
> [Run a sample that waits for human interaction](durable-functions-phone-verification.md)

0 commit comments

Comments
 (0)