@@ -600,7 +600,7 @@ async def main(req: func.HttpRequest, starter: str, instance_id: str) -> func.Ht
600
600
client = df.DurableOrchestrationClient(starter)
601
601
602
602
reason = " Found a bug"
603
- return client.terminate(instance_id, reason)
603
+ return await client.terminate(instance_id, reason)
604
604
```
605
605
606
606
# [ Java] ( #tab/java )
@@ -736,7 +736,7 @@ async def main(req: func.HttpRequest, starter: str, instance_id: str) -> func.Ht
736
736
client = df.DurableOrchestrationClient(starter)
737
737
738
738
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)
740
740
```
741
741
742
742
# [ Java] ( #tab/java )
@@ -820,7 +820,7 @@ async def main(req: func.HttpRequest, starter: str) -> func.HttpResponse:
820
820
retry_interval_in_milliseconds = get_time_in_seconds(req, retry_interval)
821
821
retry_interval_in_milliseconds = retry_interval_in_milliseconds if retry_interval_in_milliseconds != None else 1000
822
822
823
- return client.wait_for_completion_or_create_check_status_response(
823
+ return await client.wait_for_completion_or_create_check_status_response(
824
824
req,
825
825
instance_id,
826
826
timeout_in_milliseconds,
@@ -1147,7 +1147,7 @@ import azure.durable_functions as df
1147
1147
async def main (req : func.HttpRequest, starter : str , instance_id : str ) -> func.HttpResponse:
1148
1148
client = df.DurableOrchestrationClient(starter)
1149
1149
1150
- return client.purge_instance_history(instance_id)
1150
+ return await client.purge_instance_history(instance_id)
1151
1151
```
1152
1152
1153
1153
# [ Java] ( #tab/java )
@@ -1252,7 +1252,7 @@ async def main(req: func.HttpRequest, starter: str, instance_id: str) -> func.Ht
1252
1252
created_time_to = datetime.today() + timedelta(days = - 30 )
1253
1253
runtime_statuses = [OrchestrationRuntimeStatus.Completed]
1254
1254
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)
1256
1256
```
1257
1257
1258
1258
# [ Java] ( #tab/java )
0 commit comments