[backend/drive] Don't fixup media created since the start of the job
This prevents a race condition when the server is running during the operation.
This commit is contained in:
parent
b21d9691e5
commit
bfd0feaf95
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ public class StorageMaintenanceService(
|
|||
|
||||
public async Task FixupMedia(bool dryRun)
|
||||
{
|
||||
var query = db.DriveFiles.Where(p => !p.IsLink && p.Uri != null);
|
||||
var query = db.DriveFiles.Where(p => !p.IsLink && p.Uri != null && p.CreatedAt < DateTime.UtcNow);
|
||||
var total = await query.CountAsync();
|
||||
var progress = 0;
|
||||
var modified = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue