mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-11 04:57:22 +01:00
move gauge init into cleanup task
This commit is contained in:
parent
e633151b35
commit
355d34c730
1 changed files with 2 additions and 2 deletions
|
|
@ -32,8 +32,6 @@ public class MainFileCleanupService : IHostedService
|
|||
{
|
||||
_logger.LogInformation("Cleanup Service started");
|
||||
|
||||
InitializeGauges();
|
||||
|
||||
_cleanupCts = new();
|
||||
|
||||
_ = Task.Run(() => CleanUpTask(_cleanupCts.Token)).ConfigureAwait(false);
|
||||
|
|
@ -150,6 +148,8 @@ public class MainFileCleanupService : IHostedService
|
|||
|
||||
private async Task CleanUpTask(CancellationToken ct)
|
||||
{
|
||||
InitializeGauges();
|
||||
|
||||
while (!ct.IsCancellationRequested)
|
||||
{
|
||||
var cleanupCheckMinutes = _configuration.GetValueOrDefault(nameof(StaticFilesServerConfiguration.CleanupCheckInMinutes), 15);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue