fix(configdb): opt-in config-audit retention purge + after-state size cap (review 2026-10-21 08/G1)
This commit is contained in:
@@ -110,6 +110,14 @@ public static class ServiceCollectionExtensions
|
||||
// fresh scope on each tick (mirrors AuditLogPurgeActor / AuditLogIngestActor).
|
||||
services.AddScoped<IPartitionMaintenance, AuditLogPartitionMaintenance>();
|
||||
|
||||
// Opt-in config-audit retention (ScadaBridge:ConfigAudit:RetentionDays, default 0 = off).
|
||||
// Options binding to configuration is done by the host; without it the defaults apply
|
||||
// and the purge service is a no-op.
|
||||
services.TryAddEnumerable(ServiceDescriptor.Singleton<
|
||||
Microsoft.Extensions.Options.IValidateOptions<ConfigAuditOptions>, ConfigAuditOptionsValidator>());
|
||||
services.TryAddSingleton(TimeProvider.System);
|
||||
services.AddHostedService<ConfigAuditPurgeService>();
|
||||
|
||||
services.AddDataProtection()
|
||||
.PersistKeysToDbContext<ScadaBridgeDbContext>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user