From 86477eca6260c2b60dd999b8bf761de20d928c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loren=20=F0=9F=A4=93?= Date: Sat, 30 Mar 2024 00:07:48 -0400 Subject: [PATCH] still --- src/SignalsQueries/Program.cs | 39 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/SignalsQueries/Program.cs b/src/SignalsQueries/Program.cs index 924e72d..c35d058 100644 --- a/src/SignalsQueries/Program.cs +++ b/src/SignalsQueries/Program.cs @@ -41,28 +41,29 @@ async Task RunWorkerAsync() async Task ExecuteWorkflowAsync() { - // If the workflow is already running from a previous run, terminate it - try - { - await client.GetWorkflowHandle("signals-queries-workflow-id").TerminateAsync(); - } - catch - { - // Ignore - } + await Task.CompletedTask; + // // If the workflow is already running from a previous run, terminate it + // try + // { + // await client.GetWorkflowHandle("signals-queries-workflow-id").TerminateAsync(); + // } + // catch + // { + // // Ignore + // } - Console.WriteLine("Executing workflow"); - var handle = await client.StartWorkflowAsync( - (LoyaltyProgram wf) => wf.RunAsync("user-id-123"), - new(id: "signals-queries-workflow-id", taskQueue: "signals-queries-sample")); + // Console.WriteLine("Executing workflow"); + // var handle = await client.StartWorkflowAsync( + // (LoyaltyProgram wf) => wf.RunAsync("user-id-123"), + // new(id: "signals-queries-workflow-id", taskQueue: "signals-queries-sample")); - Console.WriteLine("Signal: Purchase made for $80"); - await handle.SignalAsync(wf => wf.NotifyPurchaseAsync(new Purchase("purchase-1", 8_000))); - Console.WriteLine("Signal: Purchase made for $30"); - await handle.SignalAsync(wf => wf.NotifyPurchaseAsync(new Purchase("purchase-1", 3_000))); + // Console.WriteLine("Signal: Purchase made for $80"); + // await handle.SignalAsync(wf => wf.NotifyPurchaseAsync(new Purchase("purchase-1", 8_000))); + // Console.WriteLine("Signal: Purchase made for $30"); + // await handle.SignalAsync(wf => wf.NotifyPurchaseAsync(new Purchase("purchase-1", 3_000))); - var points = await handle.QueryAsync(wf => wf.Points); - Console.WriteLine("Remaining points: {0}", points); + // var points = await handle.QueryAsync(wf => wf.Points); + // Console.WriteLine("Remaining points: {0}", points); } switch (args.ElementAtOrDefault(0))