🎨 Optimize code structure in file reanalysis
This commit is contained in:
@@ -28,10 +28,10 @@ public class FileReanalysisService(
|
|||||||
.Where(f => f.ObjectId != null)
|
.Where(f => f.ObjectId != null)
|
||||||
.Include(f => f.Object)
|
.Include(f => f.Object)
|
||||||
.ThenInclude(f => f.FileReplicas)
|
.ThenInclude(f => f.FileReplicas)
|
||||||
.Where(f => f.Object != null && (f.Object.Meta == null || f.Object.Meta.Count == 0 || f.Object.Size == 0 ||
|
.Where(f => f.Object!.Meta == null || f.Object.Meta.Count == 0 || f.Object.Size == 0 || f.Object.Hash == null)
|
||||||
f.Object.Hash == null))
|
|
||||||
.Where(f => f.Object!.FileReplicas.Count > 0)
|
.Where(f => f.Object!.FileReplicas.Count > 0)
|
||||||
.Where(f => f.CreatedAt <= deadline)
|
.Where(f => f.CreatedAt <= deadline)
|
||||||
|
.OrderBy(f => f.Object!.UpdatedAt)
|
||||||
.Skip(_failedFileIds.Count)
|
.Skip(_failedFileIds.Count)
|
||||||
.Take(limit)
|
.Take(limit)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user