⚡ Optimize reanalysis query
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using DysonNetwork.Drive;
|
||||
using DysonNetwork.Drive.Startup;
|
||||
using DysonNetwork.Drive.Storage;
|
||||
using DysonNetwork.Shared.Auth;
|
||||
using DysonNetwork.Shared.Http;
|
||||
using DysonNetwork.Shared.Registry;
|
||||
|
||||
@@ -28,7 +28,8 @@ public class FileReanalysisService(
|
||||
.Where(f => f.ObjectId != null)
|
||||
.Include(f => f.Object)
|
||||
.ThenInclude(f => f.FileReplicas)
|
||||
.Where(f => f.Object!.Meta == null || f.Object.Meta.Count == 0 || f.Object.Size == 0 || f.Object.Hash == null)
|
||||
.Where(f => ((f.Object!.MimeType == null || !f.Object.MimeType.StartsWith("application/")) &&
|
||||
(f.Object!.Meta == null || f.Object.Meta.Count == 0)) || f.Object.Size == 0 || f.Object.Hash == null)
|
||||
.Where(f => f.Object!.FileReplicas.Count > 0)
|
||||
.Where(f => f.CreatedAt <= deadline)
|
||||
.OrderBy(f => f.Object!.UpdatedAt)
|
||||
|
||||
Reference in New Issue
Block a user