using LiteCharms.Features.MidrandBooks.HealthChecks; using static LiteCharms.Features.Extensions.Postgres; using static LiteCharms.Features.MidrandBooks.Extensions.Postgres; namespace LiteCharms.Features.MidrandBooks.Extensions; public static class HealthChecks { public static IServiceCollection AddMidrandShopQuartzHealthCheck(this IServiceCollection services) { services.AddHealthChecks().AddCheck(SchedulerDbConfigName); return services; } public static IServiceCollection AddMidrandShopPostgresHealthCheck(this IServiceCollection services) { services.AddHealthChecks().AddCheck(MidrandBooksDbConfigName); return services; } public static IServiceCollection AddHealthChecksSupport(this IServiceCollection services, IConfiguration configuration) { services.AddHealthChecks() .AddCheck("Self", () => HealthCheckResult.Healthy()); return services; } }