7b0b9c7365
Solution + 23 src projects + 26 test projects renamed; folders, csproj, namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated. ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated. SQL roles/logins, LDAP domains, CLI command name, and CLI config dir (~/.scadalink → ~/.scadabridge) also renamed. Build green; 5 Host.Tests fail awaiting SQL login rename in next commit. Pre-existing StaleTagMonitor timing flakes unchanged. Rename script committed at tools/rename-to-scadabridge.sh.
31 lines
1.7 KiB
C#
31 lines
1.7 KiB
C#
namespace ZB.MOM.WW.ScadaBridge.SiteEventLogging;
|
|
|
|
public class SiteEventLogOptions
|
|
{
|
|
/// <summary>Number of days to retain site event log entries before purge; default 30.</summary>
|
|
public int RetentionDays { get; set; } = 30;
|
|
/// <summary>Maximum SQLite database size in megabytes before old entries are purged; default 1024 MB.</summary>
|
|
public int MaxStorageMb { get; set; } = 1024;
|
|
/// <summary>File path for the site event log SQLite database.</summary>
|
|
public string DatabasePath { get; set; } = "site_events.db";
|
|
/// <summary>Maximum number of rows returned per paginated query; default 500.</summary>
|
|
public int QueryPageSize { get; set; } = 500;
|
|
/// <summary>
|
|
/// SiteEventLogging-017: hard upper bound on a caller-supplied <c>PageSize</c>. A
|
|
/// misbehaving or hostile central client that requests <c>int.MaxValue</c> would
|
|
/// otherwise force the query to materialise the entire log into a single list while
|
|
/// holding the shared write lock. Silent clamp; default 500 matches
|
|
/// <see cref="QueryPageSize"/>.
|
|
/// </summary>
|
|
public int MaxQueryPageSize { get; set; } = 500;
|
|
/// <summary>Interval between purge runs; default 24 hours.</summary>
|
|
public TimeSpan PurgeInterval { get; set; } = TimeSpan.FromHours(24);
|
|
/// <summary>
|
|
/// SiteEventLogging-015: bound on the background write queue. Default 10 000 events.
|
|
/// Overflow uses <c>BoundedChannelFullMode.DropOldest</c> — callers never block; the
|
|
/// dropped event's <c>Task</c> is faulted and <c>FailedWriteCount</c> is incremented
|
|
/// so the drop is observable.
|
|
/// </summary>
|
|
public int WriteQueueCapacity { get; set; } = 10_000;
|
|
}
|