36 lines
1.3 KiB
C#
36 lines
1.3 KiB
C#
namespace PARR.Core.Services.Snapshots.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Настройки снапшотов
|
|
/// </summary>
|
|
public interface ISnapshotSettings
|
|
{
|
|
/// <summary>
|
|
/// Интервал создания снапшотов для таблицы RobotConfiguration
|
|
/// </summary>
|
|
TimeSpan RobotConfigurationSnapshotInterval { get; }
|
|
|
|
/// <summary>
|
|
/// Длительность хранения снапшотов для RobotConfiguration в таблице ConfigurationShapshots
|
|
/// </summary>
|
|
TimeSpan RobotConfigurationSnapshotRetentionPeriod { get; }
|
|
|
|
/// <summary>
|
|
/// Длительность хранения снапшотов работы роботов в таблице Shapshots
|
|
/// </summary>
|
|
TimeSpan RobotSnapshotRetentionPeriod { get; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Настройки по умолчанию для ISnapshotSettings
|
|
/// </summary>
|
|
internal record DefaultSnapshotSettings : ISnapshotSettings
|
|
{
|
|
public TimeSpan RobotConfigurationSnapshotInterval => TimeSpan.FromMinutes(2);
|
|
|
|
public TimeSpan RobotConfigurationSnapshotRetentionPeriod => TimeSpan.FromDays(60);
|
|
|
|
public TimeSpan RobotSnapshotRetentionPeriod => TimeSpan.FromDays(60);
|
|
}
|
|
}
|