Skip to content

Commit ed19a53

Browse files
committed
Address V2 documentation review
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8be112df-948c-4136-a13a-67c8dceb9513
1 parent 428a3fd commit ed19a53

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎azure-functions-durable/MIGRATION_GUIDE.md‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,9 @@ def hello(ctx: task.OrchestrationContext, name: Any):
149149
@app.route(route="start", methods=["POST"])
150150
@app.durable_client_input(client_name="client")
151151
async def start(
152-
req: func.HttpRequest,
153-
client: df.DurableFunctionsClient) -> func.HttpResponse:
154-
instance_id = await client.schedule_new_orchestration(
155-
"hello", input="Tokyo")
152+
req: func.HttpRequest,
153+
client: df.DurableFunctionsClient) -> func.HttpResponse:
154+
instance_id = await client.schedule_new_orchestration("hello", input="Tokyo")
156155
return client.create_check_status_response(req, instance_id)
157156
```
158157

@@ -172,7 +171,7 @@ def say_hello(name: str) -> str:
172171
| `context.call_activity(name, input_)` | `ctx.call_activity(name, input=input_)` |
173172
| `context.call_activity_with_retry(...)` | `ctx.call_activity(..., retry_policy=policy)` |
174173
| `context.call_sub_orchestrator(name, input_)` | `ctx.call_sub_orchestrator(name, input=input_)` |
175-
| `context.call_sub_orchestrator_with_retry(...)` | `ctx.call_sub_orchestrator(...)` |
174+
| `call_sub_orchestrator_with_retry` | `ctx.call_sub_orchestrator(..., retry_policy=...)` |
176175
| `context.task_all(tasks)` | `task.when_all(tasks)` |
177176
| `context.task_any(tasks)` | `task.when_any(tasks)` |
178177
| `context.new_guid()` | `ctx.new_uuid()` |

‎azure-functions-durable/samples/function-chaining/function_app.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
app = df.DFApp(http_auth_level=func.AuthLevel.ANONYMOUS)
1313

1414

15-
@app.route(route="orchestrators/{function_name}", methods=["POST"])
15+
@app.route(route="orchestrators/hello_cities", methods=["POST"])
1616
@app.durable_client_input(client_name="client")
1717
async def start_orchestration(
1818
req: func.HttpRequest,
1919
client: df.DurableFunctionsClient) -> func.HttpResponse:
20-
instance_id = await client.schedule_new_orchestration(
21-
req.route_params["function_name"])
20+
instance_id = await client.schedule_new_orchestration("hello_cities")
2221
return client.create_check_status_response(req, instance_id)
2322

2423

0 commit comments

Comments
 (0)