Rescan files after 30 days

This commit is contained in:
Kieran 2022-09-11 16:00:27 +01:00
parent ee6e47363a
commit 95ef34ef4b
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -29,7 +29,7 @@ public class VirusScannerService : BackgroundService
var page = 0;
while (true)
{
var files = await _fileStore.ListFiles<VoidFileMeta>(new(page, 10));
var files = await _fileStore.ListFiles<VoidFileMeta>(new(page, 1_000));
if (files.Pages < page) break;
page++;
@ -40,7 +40,7 @@ public class VirusScannerService : BackgroundService
// check for scans
var scan = await _scanStore.GetByFile(file.Id);
if (scan == default)
if (scan == default || scan.ScanTime < DateTime.UtcNow.Subtract(TimeSpan.FromDays(30)))
{
try
{