Fixed GetInProgress API - The condition for PagesRead needed to be a sum for all progress, not each row.

This commit is contained in:
Joseph Milazzo 2021-03-18 14:18:56 -05:00
parent b8cd04e1de
commit a125b2ac0b
7 changed files with 69 additions and 12 deletions

View file

@ -13,12 +13,14 @@ namespace API.Services.Tasks
private readonly ICacheService _cacheService;
private readonly IDirectoryService _directoryService;
private readonly ILogger<CleanupService> _logger;
private readonly IBackupService _backupService;
public CleanupService(ICacheService cacheService, IDirectoryService directoryService, ILogger<CleanupService> logger)
public CleanupService(ICacheService cacheService, IDirectoryService directoryService, ILogger<CleanupService> logger, IBackupService backupService)
{
_cacheService = cacheService;
_directoryService = directoryService;
_logger = logger;
_backupService = backupService;
}
[AutomaticRetry(Attempts = 3, LogEvents = false, OnAttemptsExceeded = AttemptsExceededAction.Fail)]
@ -29,7 +31,9 @@ namespace API.Services.Tasks
_directoryService.ClearDirectory(tempDirectory);
_logger.LogInformation("Cleaning cache directory");
_cacheService.Cleanup();
_logger.LogInformation("Cleaning old database backups");
_backupService.CleanupBackups();
}
}
}