forked from Kieran/void.cat
Rescan files after 30 days
This commit is contained in:
parent
ee6e47363a
commit
95ef34ef4b
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user