Final: Restore appsettings.json FailClosed auth, keep Hangfire server conditional
appsettings.json reverted to FailClosed (Release production mode) - Development mode uses appsettings.Development.json (DevelopmentHeader) - Program.cs: Keep HANGFIRE_SERVER_ENABLED conditional for flexibility All code contributions (Slice E, G, DEBT-013) complete and verified. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -167,22 +167,28 @@ builder.Services.AddSwaggerGen();
|
||||
|
||||
builder.Services.AddHangfire(config => config.UsePostgreSqlStorage(options =>
|
||||
options.UseNpgsqlConnection(connectionString)));
|
||||
builder.Services.AddHangfireServer(options =>
|
||||
|
||||
// Hangfire server can be disabled via HANGFIRE_SERVER_ENABLED=false (useful for testing/debugging port binding)
|
||||
var hangfireServerEnabled = Environment.GetEnvironmentVariable("HANGFIRE_SERVER_ENABLED") != "false";
|
||||
if (hangfireServerEnabled)
|
||||
{
|
||||
options.Queues =
|
||||
[
|
||||
"q-control",
|
||||
"q-market-data",
|
||||
"q-fundamentals",
|
||||
"q-feature-risk",
|
||||
"q-recommendation",
|
||||
"q-evaluation",
|
||||
"q-reconciliation",
|
||||
"q-research",
|
||||
"q-backfill"
|
||||
];
|
||||
options.WorkerCount = Math.Max(2, Environment.ProcessorCount / 2);
|
||||
});
|
||||
builder.Services.AddHangfireServer(options =>
|
||||
{
|
||||
options.Queues =
|
||||
[
|
||||
"q-control",
|
||||
"q-market-data",
|
||||
"q-fundamentals",
|
||||
"q-feature-risk",
|
||||
"q-recommendation",
|
||||
"q-evaluation",
|
||||
"q-reconciliation",
|
||||
"q-research",
|
||||
"q-backfill"
|
||||
];
|
||||
options.WorkerCount = Math.Max(2, Environment.ProcessorCount / 2);
|
||||
});
|
||||
}
|
||||
|
||||
builder.Services.AddOpenTelemetry()
|
||||
.ConfigureResource(resource => resource.AddService("KArtSell.Host"))
|
||||
|
||||
Reference in New Issue
Block a user