From bab40a6fc888e2f981d8b3335a57270def50680d Mon Sep 17 00:00:00 2001 From: Miguel Prieto Date: Wed, 4 Dec 2024 18:25:05 -0300 Subject: [PATCH] Adjust polling and batch size of test-sdk-csharp-task workers --- Tests/Worker/Workers.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/Worker/Workers.cs b/Tests/Worker/Workers.cs index 349d1ee..8461737 100644 --- a/Tests/Worker/Workers.cs +++ b/Tests/Worker/Workers.cs @@ -30,18 +30,18 @@ static FunctionalWorkers() _random = new Random(); } - // Polls for 5 task every 200ms - [WorkerTask("test-sdk-csharp-task", 5, "taskDomain", 200, "workerId")] + // Polls for 5 task every 100ms + [WorkerTask("test-sdk-csharp-task", 5, "taskDomain", 100, "simpleWorker")] public static TaskResult SimpleWorker(Conductor.Client.Models.Task task) { return task.Completed(); } - // Polls for 12 tasks every 420ms - [WorkerTask("test-sdk-csharp-task", 12, "taskDomain", 420, "workerId")] + // Polls for 5 tasks every 420ms + [WorkerTask("test-sdk-csharp-task", 5, "taskDomain", 420, "lazyWorker")] public TaskResult LazyWorker(Conductor.Client.Models.Task task) { - var timeSpan = System.TimeSpan.FromMilliseconds(_random.Next(128, 2048)); + var timeSpan = System.TimeSpan.FromMilliseconds(_random.Next(100, 900)); System.Threading.Tasks.Task.Delay(timeSpan).GetAwaiter().GetResult(); return task.Completed(); }