From 77440bd4b9b44bc79e4828131de5e884754c77b8 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 14 Jan 2026 01:01:35 +0800 Subject: [PATCH] :art: Optimize code structure in file reanalysis --- DysonNetwork.Drive/Storage/FileReanalysisService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DysonNetwork.Drive/Storage/FileReanalysisService.cs b/DysonNetwork.Drive/Storage/FileReanalysisService.cs index da5ab171..8e83ea13 100644 --- a/DysonNetwork.Drive/Storage/FileReanalysisService.cs +++ b/DysonNetwork.Drive/Storage/FileReanalysisService.cs @@ -28,10 +28,10 @@ public class FileReanalysisService( .Where(f => f.ObjectId != null) .Include(f => f.Object) .ThenInclude(f => f.FileReplicas) - .Where(f => f.Object != null && (f.Object.Meta == null || f.Object.Meta.Count == 0 || f.Object.Size == 0 || - f.Object.Hash == null)) + .Where(f => 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) .Skip(_failedFileIds.Count) .Take(limit) .ToListAsync();