- Add ReactivatePipeline to handle subscription reactivation, including scaling Docker services, health verification, status updates, audit logging, and broadcasting status changes. - Introduce RotateCredentialsPipeline for OAuth2 credential rotation, managing the deletion of old apps, creation of new ones, credential storage, access verification, and audit logging. - Create StepRunner to manage job step execution, including lifecycle management and progress broadcasting via SignalR. - Implement SuspendPipeline for subscription suspension, scaling down services, updating statuses, logging audits, and broadcasting changes. - Add UpdateScreenLimitPipeline to update Xibo CMS screen limits and record snapshots. - Introduce XiboFeatureManifests for hardcoded feature ACLs per role. - Add docker-compose.dev.yml for local development with PostgreSQL setup.
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using Quartz;
|
|
using OTSSignsOrchestrator.Server.Health.Checks;
|
|
|
|
namespace OTSSignsOrchestrator.Server.Health;
|
|
|
|
/// <summary>
|
|
/// Quartz job that runs the <see cref="AuthentikGlobalHealthCheck"/> every 2 minutes
|
|
/// on a separate schedule from the per-instance health checks.
|
|
/// </summary>
|
|
[DisallowConcurrentExecution]
|
|
public sealed class AuthentikGlobalHealthJob : IJob
|
|
{
|
|
private readonly AuthentikGlobalHealthCheck _check;
|
|
private readonly ILogger<AuthentikGlobalHealthJob> _logger;
|
|
|
|
public AuthentikGlobalHealthJob(
|
|
AuthentikGlobalHealthCheck check,
|
|
ILogger<AuthentikGlobalHealthJob> logger)
|
|
{
|
|
_check = check;
|
|
_logger = logger;
|
|
}
|
|
|
|
public async Task Execute(IJobExecutionContext context)
|
|
{
|
|
try
|
|
{
|
|
var result = await _check.RunGlobalAsync(context.CancellationToken);
|
|
_logger.LogInformation("Authentik global health: {Status} — {Message}",
|
|
result.Status, result.Message);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_logger.LogError(ex, "Authentik global health job failed");
|
|
}
|
|
}
|
|
}
|