[backend/drive] Fix handling of failed files in object storage migrator

This fixes an edge case that could cause it to enter an infinite loop.
This commit is contained in:
Laura Hausmann 2024-06-15 01:19:37 +02:00
parent c7bacc2856
commit 9f3bbe6c08
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -30,6 +30,7 @@ public class StorageMaintenanceService(
{
var keys = await db.DriveFiles
.Where(p => p.StoredInternal && !p.IsLink)
.Where(p => !failed.Contains(p.Id))
.GroupBy(p => p.AccessKey)
.Select(p => p.Key)
.OrderBy(p => p)