Improve configuration of RemoteExecutor

This commit is contained in:
Stone_Red
2025-12-23 14:43:19 +01:00
parent 64818f735f
commit 5819432c36
16 changed files with 204 additions and 63 deletions
@@ -0,0 +1,21 @@
using RemoteExec.Client.LoadBalancingStrategies;
namespace RemoteExec.Client;
public class RemoteExecutorOptions
{
public ILoadBalancingStrategy Strategy { get; set; } = new ResourceAwareStrategy();
// How long to wait for a result before throwing a TimeoutException
public TimeSpan ExecutionTimeout { get; set; } = TimeSpan.FromMinutes(5);
// Backoff settings for server reconnections
public TimeSpan ServerReconnectInitialDelay { get; set; } = TimeSpan.FromSeconds(5);
public TimeSpan ServerReconnectMaxDelay { get; set; } = TimeSpan.FromSeconds(60);
// Reliability: How many times a task can be requeued before failing
public int MaxTaskRetries { get; set; } = 3;
// Capacity: Stop accepting Execute calls if the global queue is too full
public int GlobalQueueCapacity { get; set; } = 1000;
}