up
This commit is contained in:
@@ -87,6 +87,14 @@ public static class ObserverServiceCollectionExtensions
|
||||
client.Timeout = TimeSpan.FromSeconds(Math.Clamp(backend.RequestTimeoutSeconds, 1, 120));
|
||||
});
|
||||
|
||||
services.AddHttpClient<IRuntimeFactsClient, RuntimeFactsClient>()
|
||||
.ConfigureHttpClient((provider, client) =>
|
||||
{
|
||||
var optionsMonitor = provider.GetRequiredService<IOptionsMonitor<ZastavaObserverOptions>>();
|
||||
var observer = optionsMonitor.CurrentValue;
|
||||
client.Timeout = TimeSpan.FromSeconds(Math.Clamp(observer.Backend.RequestTimeoutSeconds, 1, 120));
|
||||
});
|
||||
|
||||
services.TryAddEnumerable(ServiceDescriptor.Singleton<IPostConfigureOptions<ZastavaRuntimeOptions>, ObserverRuntimeOptionsPostConfigure>());
|
||||
|
||||
// Surface environment + cache/manifest/secrets wiring
|
||||
|
||||
Reference in New Issue
Block a user