Skip to content

Commit 323f2cf

Browse files
Merge pull request #312929 from hhunter-ms/hh-408604
[Durable][UUF] Update code snippet `GetInstancesAsync` --> `GetInstanceAsync`
2 parents c020996 + d32fb79 commit 323f2cf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

articles/azure-functions/durable/durable-functions-singletons.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ For background jobs, you often need to ensure that only one instance of a partic
2626

2727
::: zone pivot="durable-functions"
2828

29-
The following example shows an HTTP-trigger function that creates a singleton background job orchestration. The code ensures that only one instance exists for a specified instance ID.
29+
The following example shows an HTTP-trigger function that creates a singleton background job orchestration. The code attempts to ensure that only one active instance exists for a specified instance ID.
3030

3131
# [C#](#tab/csharp)
3232

@@ -42,7 +42,7 @@ public static async Task<HttpResponseData> RunSingle(
4242
ILogger logger = executionContext.GetLogger("HttpStartSingle");
4343

4444
// Check if an instance with the specified ID already exists or an existing one stopped running(completed/failed/terminated).
45-
OrchestrationMetadata? existingInstance = await starter.GetInstancesAsync(instanceId);
45+
OrchestrationMetadata? existingInstance = await starter.GetInstanceAsync(instanceId, getInputsAndOutputs: false);
4646
if (existingInstance == null
4747
|| existingInstance.RuntimeStatus == OrchestrationRuntimeStatus.Completed
4848
|| existingInstance.RuntimeStatus == OrchestrationRuntimeStatus.Failed
@@ -250,7 +250,7 @@ public HttpResponseMessage runSingle(
250250

251251
::: zone pivot="durable-task-sdks"
252252

253-
The following example shows how to create a singleton orchestration using the Durable Task SDKs. The code ensures that only one instance exists for a specified instance ID.
253+
The following example shows how to create a singleton orchestration using the Durable Task SDKs. The code attempts to ensure that only one active instance exists for a specified instance ID.
254254

255255
# [C#](#tab/csharp)
256256

0 commit comments

Comments
 (0)