Skip to content

Commit

Permalink
add id reuse policy for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
angelazhou32 committed Feb 7, 2025
1 parent 08e7b13 commit 1304e53
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
9 changes: 6 additions & 3 deletions exercises/testing-code/practice/Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
});

var input = new TranslationWorkflow.TranslationWorkflowInput(args[0], args[1]);
var options = new WorkflowOptions(
id: "translation-workflow",
taskQueue: WorkflowConstants.TaskQueueName);
var options = new WorkflowOptions
{
Id = "translation-workflow",
TaskQueue = WorkflowConstants.TaskQueueName,
IdReusePolicy = WorkflowIdReusePolicy.AllowDuplicate,
};

// Run workflow
var result = await client.ExecuteWorkflowAsync(
Expand Down
10 changes: 7 additions & 3 deletions exercises/testing-code/solution/Client/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file is designated to run the Workflow
using Microsoft.Extensions.Logging;
using Temporalio.Api.Enums.V1;
using Temporalio.Client;
using TemporalioDurableExecution.Workflow;

Expand All @@ -13,9 +14,12 @@
});

var input = new TranslationWorkflow.TranslationWorkflowInput(args[0], args[1]);
var options = new WorkflowOptions(
id: "translation-workflow",
taskQueue: WorkflowConstants.TaskQueueName);
var options = new WorkflowOptions
{
Id = "translation-workflow",
TaskQueue = WorkflowConstants.TaskQueueName,
IdReusePolicy = WorkflowIdReusePolicy.AllowDuplicate,
};

// Run workflow
var result = await client.ExecuteWorkflowAsync(
Expand Down

0 comments on commit 1304e53

Please sign in to comment.