part #2
This commit is contained in:
@@ -11,8 +11,9 @@ using StellaOps.Doctor.Scheduler;
|
||||
using StellaOps.Doctor.Scheduler.Models;
|
||||
using StellaOps.Doctor.Scheduler.Options;
|
||||
using StellaOps.Doctor.Scheduler.Services;
|
||||
using StellaOps.Worker.Health;
|
||||
|
||||
var builder = Host.CreateApplicationBuilder(args);
|
||||
var builder = WebApplication.CreateSlimBuilder(args);
|
||||
|
||||
// Configure options
|
||||
builder.Services.Configure<DoctorSchedulerOptions>(
|
||||
@@ -42,8 +43,11 @@ builder.Services.AddSingleton<ScheduleExecutor>();
|
||||
// Add background worker
|
||||
builder.Services.AddHostedService<DoctorScheduleWorker>();
|
||||
|
||||
var host = builder.Build();
|
||||
await host.RunAsync();
|
||||
builder.Services.AddWorkerHealthChecks();
|
||||
|
||||
var app = builder.Build();
|
||||
app.MapWorkerHealthEndpoints();
|
||||
await app.RunAsync();
|
||||
|
||||
// Placeholder implementations for development
|
||||
file sealed class InMemoryScheduleRepository : IScheduleRepository
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
<Description>Scheduled Doctor health check runs with alerting and trending</Description>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Cronos" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" />
|
||||
@@ -19,6 +23,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\__Libraries\StellaOps.Doctor\StellaOps.Doctor.csproj" />
|
||||
<ProjectReference Include="..\..\__Libraries\StellaOps.Worker.Health\StellaOps.Worker.Health.csproj" />
|
||||
<ProjectReference Include="..\StellaOps.Doctor.WebService\StellaOps.Doctor.WebService.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user