14 lines
410 B
C#
14 lines
410 B
C#
namespace Nexus.Api.Services;
|
|
|
|
public sealed class StaleTaskRecoveryOptions
|
|
{
|
|
public const string SectionName = "TaskRecovery";
|
|
|
|
public int StaleHours { get; set; } = 2;
|
|
public int IntervalMinutes { get; set; } = 30;
|
|
|
|
public TimeSpan GetStaleThreshold() => TimeSpan.FromHours(Math.Max(1, StaleHours));
|
|
|
|
public TimeSpan GetInterval() => TimeSpan.FromMinutes(Math.Max(1, IntervalMinutes));
|
|
}
|