feat(jobs): jobs Hangfire rétention/cleanup + dashboard admin (Fixes #8)
- RetentionCheckJob (quotidien 3h) : purge enregistrements expirés par StoragePolicy via ExecuteDelete (1 requête, pas de boucle), défaut 30 j - CleanupUnknownFacesJob (dim 5h) : personnes 'unknown' > 30 j - CleanupLicensePlatesJob (dim 6h) : plaques non associées > 30 j - DatabaseMaintenanceJob (dim 7h) : VACUUM events + REINDEX (VACUUM FULL 1er dimanche) - Dashboard Hangfire /hangfire protégé AdminJobs (filtre custom) - S3CleanupJob dépend du ticket #7 (stockage S3) — non inclus ici - Tests : 2 (rétention avec/sans politique)
This commit is contained in:
1 parent
2ee12a39f8
commit
e3d14eec04
9 files changed
+366
No files matched your search
@@ -12,6 +12,7 @@ using Heimdall.Infrastructure.BackgroundJobs;
|
||||
using Heimdall.Infrastructure.Security;
|
||||
using Heimdall.Web.Components;
|
||||
using Heimdall.Api.Hubs;
|
||||
using Heimdall.Api;
|
||||
using Heimdall.Web.Services;
|
||||
using Hangfire;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
@@ -570,6 +571,17 @@ public partial class Program {
|
||||
app.UseAuthorization();
|
||||
app.UseAntiforgery();
|
||||
|
||||
// Hangfire dashboard — Admin uniquement (policy AdminJobs).
|
||||
// MapHangfireDashboard est utilisé car UseHangfireDashboard avec
|
||||
// DashboardOptions.Authorization n'existe pas pour les policies ASP.NET.
|
||||
app.MapHangfireDashboard("/hangfire", new DashboardOptions
|
||||
{
|
||||
Authorization =
|
||||
[
|
||||
new HangfireAdminAuthorizationFilter(),
|
||||
],
|
||||
});
|
||||
|
||||
app.MapRazorComponents<App>().AddInteractiveServerRenderMode();
|
||||
app.MapControllers();
|
||||
app.MapHub<ConfigHub>("/hubs/config");
|
||||
|
||||
Reference in new issue
Block a user