Skip to content

Commit 6001ecc

Browse files
Merge pull request #232291 from davidmrdavid/dajusto/update-py-instance-management
Add missing `await` statements on DF Python instance management docs
2 parents 48ba3fa + c05eba0 commit 6001ecc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/azure-functions/durable/durable-functions-instance-management.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ async def main(req: func.HttpRequest, starter: str, instance_id: str) -> func.Ht
600600
client = df.DurableOrchestrationClient(starter)
601601

602602
reason = "Found a bug"
603-
return client.terminate(instance_id, reason)
603+
return await client.terminate(instance_id, reason)
604604
```
605605

606606
# [Java](#tab/java)
@@ -736,7 +736,7 @@ async def main(req: func.HttpRequest, starter: str, instance_id: str) -> func.Ht
736736
client = df.DurableOrchestrationClient(starter)
737737

738738
event_data = [1, 2 ,3]
739-
return client.raise_event(instance_id, 'MyEvent', event_data)
739+
return await client.raise_event(instance_id, 'MyEvent', event_data)
740740
```
741741

742742
# [Java](#tab/java)
@@ -820,7 +820,7 @@ async def main(req: func.HttpRequest, starter: str) -> func.HttpResponse:
820820
retry_interval_in_milliseconds = get_time_in_seconds(req, retry_interval)
821821
retry_interval_in_milliseconds = retry_interval_in_milliseconds if retry_interval_in_milliseconds != None else 1000
822822

823-
return client.wait_for_completion_or_create_check_status_response(
823+
return await client.wait_for_completion_or_create_check_status_response(
824824
req,
825825
instance_id,
826826
timeout_in_milliseconds,
@@ -1147,7 +1147,7 @@ import azure.durable_functions as df
11471147
async def main(req: func.HttpRequest, starter: str, instance_id: str) -> func.HttpResponse:
11481148
client = df.DurableOrchestrationClient(starter)
11491149

1150-
return client.purge_instance_history(instance_id)
1150+
return await client.purge_instance_history(instance_id)
11511151
```
11521152

11531153
# [Java](#tab/java)
@@ -1252,7 +1252,7 @@ async def main(req: func.HttpRequest, starter: str, instance_id: str) -> func.Ht
12521252
created_time_to = datetime.today() + timedelta(days = -30)
12531253
runtime_statuses = [OrchestrationRuntimeStatus.Completed]
12541254

1255-
return client.purge_instance_history_by(created_time_from, created_time_to, runtime_statuses)
1255+
return await client.purge_instance_history_by(created_time_from, created_time_to, runtime_statuses)
12561256
```
12571257

12581258
# [Java](#tab/java)

0 commit comments

Comments
 (0)