Added abstractions

Internal service bus support enabled
Added quartz support
Reconfigured extensions
This commit is contained in:
Khwezi Mngoma
2026-05-07 16:08:47 +02:00
parent c6ce9c85df
commit acc0d44c7c
31 changed files with 570 additions and 47 deletions
+34
View File
@@ -0,0 +1,34 @@
using LiteCharms.Infrastructure.HealthChecks;
namespace LiteCharms.Extensions;
public static class HealthChecks
{
public static IServiceCollection AddQuartzHealtchCheck(this IServiceCollection services)
{
services.AddHealthChecks().AddCheck<QuartzHealthCheck>("Quartz");
return services;
}
public static IServiceCollection AddPostgresHealtchCheck(this IServiceCollection services)
{
services.AddHealthChecks().AddCheck<PostgresHealthCheck>("PostgreSQL");
return services;
}
public static IServiceCollection AddHealthChecksSupport(this IServiceCollection services, IConfiguration configuration)
{
services.AddHealthChecks()
.AddCheck("Self", () => HealthCheckResult.Healthy());
//services.AddHealthChecksUI(setup =>
//{
// setup.AddHealthCheckEndpoint("Lead Generator", $"{configuration["ASPNETCORE_URLS"]}/health");
// setup.SetEvaluationTimeInSeconds(15);
//}).AddInMemoryStorage(databaseName: "healthuidb");
return services;
}
}