Stabilzie modules

This commit is contained in:
master
2026-02-16 07:32:38 +02:00
parent ab794e167c
commit 45c0f1bb59
45 changed files with 3055 additions and 156 deletions

View File

@@ -25,7 +25,11 @@ using StellaOps.Scheduler.WebService.PolicyRuns;
using StellaOps.Scheduler.WebService.PolicySimulations;
using StellaOps.Scheduler.WebService.Runs;
using StellaOps.Scheduler.WebService.Schedules;
using StellaOps.Scheduler.WebService.Exceptions;
using StellaOps.Scheduler.WebService.VulnerabilityResolverJobs;
using StellaOps.Scheduler.Worker.Exceptions;
using StellaOps.Scheduler.Worker.Observability;
using StellaOps.Scheduler.Worker.Options;
using System.Linq;
var builder = WebApplication.CreateBuilder(args);
@@ -125,9 +129,21 @@ else
builder.Services.AddSingleton<ICartographerWebhookClient, NullCartographerWebhookClient>();
}
builder.Services.AddScoped<IGraphJobService, GraphJobService>();
builder.Services.AddImpactIndexStub();
builder.Services.AddImpactIndex();
builder.Services.AddResolverJobServices();
// Exception lifecycle workers (SCHED-WORKER-25-101/25-102)
var workerOptions = builder.Configuration.GetSection("Scheduler:Worker").Get<SchedulerWorkerOptions>() ?? new SchedulerWorkerOptions();
workerOptions.Validate();
builder.Services.AddSingleton(workerOptions);
builder.Services.AddSingleton<SchedulerWorkerMetrics>();
builder.Services.AddSingleton<IExceptionRepository, PostgresExceptionRepository>();
builder.Services.AddSingleton<IExceptionEventPublisher>(NullExceptionEventPublisher.Instance);
builder.Services.AddSingleton<IExpiringDigestService>(NullExpiringDigestService.Instance);
builder.Services.AddSingleton<IExpiringAlertService>(NullExpiringAlertService.Instance);
builder.Services.AddHostedService<ExceptionLifecycleWorker>();
builder.Services.AddHostedService<ExpiringNotificationWorker>();
var schedulerOptions = builder.Configuration.GetSection("Scheduler").Get<SchedulerOptions>() ?? new SchedulerOptions();
schedulerOptions.Validate();
builder.Services.AddSingleton(schedulerOptions);