conductor-sdk / conductor-csharp

The conductor-csharp repository provides the client SDKs to build task workers in C#
Apache License 2.0
41 stars 16 forks source link

Poller should sleep only when no work was found #43

Closed rmindel closed 1 year ago

rmindel commented 1 year ago

This is to avoid work waiting on the conductor's end

gardusig commented 1 year ago

Tests currently does not pass when someone outside of organization opens up a PR. Tested locally:

#12 33.51       Worker : buildkitsandbox_1890818121  - Polling for task type: test-sdk-csharp-task
#12 34.18 [xUnit.net 00:00:24.39]   Finished:    conductor-csharp.test
#12 34.26   Passed Tests.Worker.WorkerTests.TestWorkflowAsyncExecution [24 s]
#12 34.26
#12 34.27 Test Run Successful.
#12 34.27 Total tests: 4
#12 34.27      Passed: 4
#12 34.27  Total time: 24.7879 Seconds
gardusig commented 1 year ago

We're looking for a more generic solution, which involves batch polling and a unique sleep controller per worker. Stay tuned and we'll publish asap :)