29 lines
1.1 KiB
C#
29 lines
1.1 KiB
C#
namespace ScadaLink.AuditLog.Site.Telemetry;
|
|
|
|
/// <summary>
|
|
/// Tuning knobs for the site-side <see cref="SiteAuditTelemetryActor"/> drain
|
|
/// loop. Defaults mirror Bundle D's plan: drain every 5 s while rows are
|
|
/// flowing (busy), every 30 s when the queue is empty (idle).
|
|
/// </summary>
|
|
public sealed class SiteAuditTelemetryOptions
|
|
{
|
|
/// <summary>
|
|
/// Maximum number of <see cref="ScadaLink.Commons.Entities.Audit.AuditEvent"/>
|
|
/// rows read from the site SQLite queue and pushed in a single gRPC batch.
|
|
/// </summary>
|
|
public int BatchSize { get; set; } = 256;
|
|
|
|
/// <summary>
|
|
/// Delay between drains when the previous drain found at least one Pending
|
|
/// row OR the previous push faulted. Re-drain quickly to keep telemetry
|
|
/// flowing and to retry transient gRPC errors.
|
|
/// </summary>
|
|
public int BusyIntervalSeconds { get; set; } = 5;
|
|
|
|
/// <summary>
|
|
/// Delay between drains when the previous drain found no Pending rows.
|
|
/// Longer interval avoids hammering an idle SQLite + gRPC channel.
|
|
/// </summary>
|
|
public int IdleIntervalSeconds { get; set; } = 30;
|
|
}
|