add central cold storage options for file servers

add access times I guess

access, not write

overwrite times after copying
This commit is contained in:
Stanley Dimant
2024-05-02 14:03:42 +02:00
committed by Loporrit
parent 180d7d504d
commit fb22a267ac
6 changed files with 151 additions and 51 deletions

View File

@@ -12,7 +12,9 @@ public class MetricsAPI
public const string GaugePairs = "mare_pairs";
public const string GaugePairsPaused = "mare_pairs_paused";
public const string GaugeFilesTotal = "mare_files";
public const string GaugeFilesTotalColdStorage = "mare_files_cold";
public const string GaugeFilesTotalSize = "mare_files_size";
public const string GaugeFilesTotalSizeColdStorage = "mare_files_size_cold";
public const string GaugeFilesDownloadingFromCache = "mare_files_downloading_from_cache";
public const string GaugeFilesTasksWaitingForDownloadFromCache = "mare_files_waiting_for_dl";
public const string CounterUserPushData = "mare_user_push";

View File

@@ -17,6 +17,10 @@ public class StaticFilesServerConfiguration : MareConfigurationBase
public int DownloadQueueReleaseSeconds { get; set; } = 15;
public int DownloadQueueClearLimit { get; set; } = 15000;
public int CleanupCheckInMinutes { get; set; } = 15;
public bool UseColdStorage { get; set; } = false;
public string? ColdStorageDirectory { get; set; } = null;
public double ColdStorageSizeHardLimitInGiB { get; set; } = -1;
public double ColdStorageUnusedFileRetentionPeriodInDays { get; set; } = 30;
[RemoteConfiguration]
public Uri CdnFullUrl { get; set; } = null;
[RemoteConfiguration]
@@ -28,6 +32,10 @@ public class StaticFilesServerConfiguration : MareConfigurationBase
sb.AppendLine($"{nameof(MainFileServerAddress)} => {MainFileServerAddress}");
sb.AppendLine($"{nameof(ForcedDeletionOfFilesAfterHours)} => {ForcedDeletionOfFilesAfterHours}");
sb.AppendLine($"{nameof(CacheSizeHardLimitInGiB)} => {CacheSizeHardLimitInGiB}");
sb.AppendLine($"{nameof(UseColdStorage)} => {UseColdStorage}");
sb.AppendLine($"{nameof(ColdStorageDirectory)} => {ColdStorageDirectory}");
sb.AppendLine($"{nameof(ColdStorageSizeHardLimitInGiB)} => {ColdStorageSizeHardLimitInGiB}");
sb.AppendLine($"{nameof(ColdStorageUnusedFileRetentionPeriodInDays)} => {ColdStorageUnusedFileRetentionPeriodInDays}");
sb.AppendLine($"{nameof(UnusedFileRetentionPeriodInDays)} => {UnusedFileRetentionPeriodInDays}");
sb.AppendLine($"{nameof(CacheDirectory)} => {CacheDirectory}");
sb.AppendLine($"{nameof(DownloadQueueSize)} => {DownloadQueueSize}");