feat(core,dal,domain,snapshotWorker): Воркер по управлению снапшотами. Создание сгапшотов для таблицы RobotConfigurations
This commit is contained in:
35
PARR.Core/Services/Snapshots/Interfaces/ISnapshotSettings.cs
Normal file
35
PARR.Core/Services/Snapshots/Interfaces/ISnapshotSettings.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user