Disable workers
This commit is contained in:
@@ -4,7 +4,6 @@ using HealthChecks.UI.Client;
|
||||
using Managing.Api.Authorization;
|
||||
using Managing.Api.Filters;
|
||||
using Managing.Api.HealthChecks;
|
||||
using Managing.Api.Workers;
|
||||
using Managing.Application.Hubs;
|
||||
using Managing.Bootstrap;
|
||||
using Managing.Common;
|
||||
@@ -74,15 +73,11 @@ var web3ProxyUrl = builder.Configuration.GetSection("Web3Proxy")["BaseUrl"];
|
||||
|
||||
// Add HTTP client for Web3Proxy health check with detailed response
|
||||
builder.Services.AddHttpClient("Web3ProxyHealthCheck")
|
||||
.ConfigureHttpClient(client => {
|
||||
client.Timeout = TimeSpan.FromSeconds(15);
|
||||
});
|
||||
.ConfigureHttpClient(client => { client.Timeout = TimeSpan.FromSeconds(15); });
|
||||
|
||||
// Add HTTP client for GMX API health check
|
||||
builder.Services.AddHttpClient("GmxHealthCheck")
|
||||
.ConfigureHttpClient(client => {
|
||||
client.Timeout = TimeSpan.FromSeconds(10);
|
||||
});
|
||||
.ConfigureHttpClient(client => { client.Timeout = TimeSpan.FromSeconds(10); });
|
||||
|
||||
// Register Web3ProxyHealthCheck with the web3ProxyUrl
|
||||
builder.Services.AddSingleton<Web3ProxyHealthCheck>(sp =>
|
||||
@@ -200,7 +195,7 @@ builder.Services.AddSwaggerGen(options =>
|
||||
});
|
||||
|
||||
builder.WebHost.SetupDiscordBot();
|
||||
builder.Services.AddHostedService<BotManagerWorker>();
|
||||
// builder.Services.AddHostedService<BotManagerWorker>();
|
||||
|
||||
// App
|
||||
var app = builder.Build();
|
||||
@@ -253,19 +248,19 @@ app.UseEndpoints(endpoints =>
|
||||
Predicate = r => r.Tags.Contains("live"),
|
||||
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
|
||||
});
|
||||
|
||||
|
||||
endpoints.MapHealthChecks("/health/candles", new HealthCheckOptions
|
||||
{
|
||||
Predicate = r => r.Tags.Contains("candles"),
|
||||
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
|
||||
});
|
||||
|
||||
|
||||
endpoints.MapHealthChecks("/health/gmx", new HealthCheckOptions
|
||||
{
|
||||
Predicate = r => r.Name == "gmx-connectivity",
|
||||
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
|
||||
});
|
||||
|
||||
|
||||
endpoints.MapHealthChecks("/health/web3proxy", new HealthCheckOptions
|
||||
{
|
||||
Predicate = r => r.Name == "web3proxy",
|
||||
|
||||
Reference in New Issue
Block a user