feat(auditlog): make SiteAuditBacklogReporter cadence configurable (deferred #21)
Consolidates the reporter's poll cadence onto SqliteAuditWriterOptions instead of the hard-coded 30 s constant, closing deferred-work register item #21 (the config- shape cleanup its own XML doc flagged as a follow-up). - SqliteAuditWriterOptions.BacklogPollIntervalSeconds (default 30). - Reporter reads it via IOptions; precedence explicit-override (tests) > configured > 30 s default; a non-positive value falls back to the default. Corrected the stale "hard-code / tunable in a follow-up" class-doc. - Cadence tests + register updated (row 21 -> Resolved). Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
@@ -24,4 +24,13 @@ public sealed class SqliteAuditWriterOptions
|
||||
|
||||
/// <summary>Soft flush interval the writer enforces when fewer than BatchSize events are queued.</summary>
|
||||
public int FlushIntervalMs { get; set; } = 50;
|
||||
|
||||
/// <summary>
|
||||
/// Poll cadence, in seconds, for the <c>SiteAuditBacklogReporter</c> hosted service
|
||||
/// that probes the SQLite audit backlog and pushes the snapshot onto the site health
|
||||
/// report. Half a typical 60 s health-report interval keeps the snapshot fresh without
|
||||
/// spinning the SQL probe more often than necessary. A non-positive value falls back to
|
||||
/// the reporter's 30 s default.
|
||||
/// </summary>
|
||||
public int BacklogPollIntervalSeconds { get; set; } = 30;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user