up
This commit is contained in:
@@ -109,7 +109,16 @@ services.AddSingleton<PluginCatalog>(provider =>
|
||||
services.AddOptions<VexWorkerOrchestratorOptions>()
|
||||
.Bind(configuration.GetSection("Excititor:Worker:Orchestrator"))
|
||||
.ValidateOnStart();
|
||||
services.AddSingleton<IVexWorkerOrchestratorClient, VexWorkerOrchestratorClient>();
|
||||
services.AddHttpClient<IVexWorkerOrchestratorClient, VexWorkerOrchestratorClient>((provider, client) =>
|
||||
{
|
||||
var opts = provider.GetRequiredService<IOptions<VexWorkerOrchestratorOptions>>().Value;
|
||||
if (opts.BaseAddress is not null)
|
||||
{
|
||||
client.BaseAddress = opts.BaseAddress;
|
||||
}
|
||||
|
||||
client.Timeout = opts.RequestTimeout;
|
||||
});
|
||||
services.AddSingleton<VexWorkerHeartbeatService>();
|
||||
|
||||
services.AddSingleton<IVexProviderRunner, DefaultVexProviderRunner>();
|
||||
|
||||
Reference in New Issue
Block a user