From 21e6d444a7f06b180d915aff0bbb62999e6bc013 Mon Sep 17 00:00:00 2001 From: hardstylewyl <827778732@qq.com> Date: Thu, 27 Mar 2025 11:57:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=A2=84=E8=AD=A6?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=9F=A5=E8=AF=A2=E6=94=B9=E4=B8=BA=E5=85=A8?= =?UTF-8?q?=E9=87=8F=E6=9F=A5=E8=AF=A2=EF=BC=8C=E4=BB=A5=E4=BF=9D=E8=AF=81?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=A2=84=E8=AD=A6=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Hangfire/WarningNotifyAggregator.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SJZY.Track.Application/Hangfire/WarningNotifyAggregator.cs b/src/SJZY.Track.Application/Hangfire/WarningNotifyAggregator.cs index e71eb5fa..25267a78 100644 --- a/src/SJZY.Track.Application/Hangfire/WarningNotifyAggregator.cs +++ b/src/SJZY.Track.Application/Hangfire/WarningNotifyAggregator.cs @@ -45,12 +45,12 @@ public sealed class WarningNotifyAggregator : ITransientDependency // 4.绑定这个任务id(可能是多个)和jobId用户跟踪任务状态 public async Task<(List NotifyConfigs, HashSet taskIds)> ScanNotifyAndAggregateAsync() { - // 构建查询游标 - var options = _optionsMonitor.CurrentValue; - var cursor = DateTime.Now.Subtract(TimeSpan.FromHours(options.ScanWarningNotifyTaskHourInterval)); + // 构建查询游标 todo:全量查询需要优化 + // var options = _optionsMonitor.CurrentValue; + // var cursor = DateTime.Now.Subtract(TimeSpan.FromHours(options.ScanWarningNotifyTaskHourInterval)); // 1.扫描出可能进行的任务 - var tasks = await _warningTaskRepository.ScanNotifyTaskAsync(cursor); + var tasks = await _warningTaskRepository.ScanNotifyTaskAsync(); // 2.可行性过滤 var filtered = await FilterAsync(tasks);