🐛 Ensure validation files will be updated

This commit is contained in:
2026-01-14 23:38:32 +08:00
parent 6488e2224e
commit ca21acbff6

View File

@@ -210,7 +210,7 @@ public class FileReanalysisService(
if (!_bucketObjectCache.TryGetValue(dest.Bucket, out var objectNames)) if (!_bucketObjectCache.TryGetValue(dest.Bucket, out var objectNames))
{ {
var listArgs = new ListObjectsArgs().WithBucket(dest.Bucket); var listArgs = new ListObjectsArgs().WithBucket(dest.Bucket);
objectNames = new HashSet<string>(); objectNames = [];
await foreach (var item in client.ListObjectsEnumAsync(listArgs)) await foreach (var item in client.ListObjectsEnumAsync(listArgs))
{ {
if (item.Key.EndsWith(".compressed") || item.Key.EndsWith(".thumbnail")) if (item.Key.EndsWith(".compressed") || item.Key.EndsWith(".thumbnail"))
@@ -252,10 +252,9 @@ public class FileReanalysisService(
} }
} }
if (updated) if (!updated) continue;
{ logger.LogInformation("Updated compression/thumbnail status for file {FileId}", file.Id);
logger.LogInformation("Updated compression/thumbnail status for file {FileId}", file.Id); db.Update(file.Object);
}
} }
// Save changes for the group // Save changes for the group