HRM-10/HRM.UI/Realtime/RealtimeSettings.cs
2026-11-30 13:35:21 +06:00

27 lines
1.4 KiB
C#

namespace HRM.UI.Realtime
{
/// <summary>
/// The "Realtime" section of appsettings.json. Every value has a sensible default, so the section may be left out.
/// </summary>
public class RealtimeSettings
{
/// <summary>How often the server pings an idle connection (seconds). Keep below any proxy idle timeout.</summary>
public int KeepAliveSeconds { get; set; } = 15;
/// <summary>A client is dropped when nothing arrives from it for this long (seconds). Must be about 2 x the client's keep-alive.</summary>
public int ClientTimeoutSeconds { get; set; } = 30;
/// <summary>Largest message a client may send to the hub (KB). Clients only send small commands.</summary>
public int MaxReceiveMessageKB { get; set; } = 64;
/// <summary>Background jobs allowed to run at the same time; further jobs wait in the queue.</summary>
public int MaxConcurrentJobs { get; set; } = 4;
/// <summary>A finished job's result stays readable this long (minutes), so a reload or a late tab still sees it.</summary>
public int FinishedJobRetentionMinutes { get; set; } = 60;
/// <summary>Least time between two progress messages of one job (milliseconds). Stage changes and the end are always sent at once.</summary>
public int ProgressThrottleMilliseconds { get; set; } = 250;
}
}