Merge branch 'S07' into test
This commit is contained in:
commit
e9067685f2
@ -45,12 +45,12 @@ public sealed class WarningNotifyAggregator : ITransientDependency
|
|||||||
// 4.绑定这个任务id(可能是多个)和jobId用户跟踪任务状态
|
// 4.绑定这个任务id(可能是多个)和jobId用户跟踪任务状态
|
||||||
public async Task<(List<NotifyConfig> NotifyConfigs, HashSet<int> taskIds)> ScanNotifyAndAggregateAsync()
|
public async Task<(List<NotifyConfig> NotifyConfigs, HashSet<int> taskIds)> ScanNotifyAndAggregateAsync()
|
||||||
{
|
{
|
||||||
// 构建查询游标
|
// 构建查询游标 todo:全量查询需要优化
|
||||||
var options = _optionsMonitor.CurrentValue;
|
// var options = _optionsMonitor.CurrentValue;
|
||||||
var cursor = DateTime.Now.Subtract(TimeSpan.FromHours(options.ScanWarningNotifyTaskHourInterval));
|
// var cursor = DateTime.Now.Subtract(TimeSpan.FromHours(options.ScanWarningNotifyTaskHourInterval));
|
||||||
|
|
||||||
// 1.扫描出可能进行的任务
|
// 1.扫描出可能进行的任务
|
||||||
var tasks = await _warningTaskRepository.ScanNotifyTaskAsync(cursor);
|
var tasks = await _warningTaskRepository.ScanNotifyTaskAsync();
|
||||||
|
|
||||||
// 2.可行性过滤
|
// 2.可行性过滤
|
||||||
var filtered = await FilterAsync(tasks);
|
var filtered = await FilterAsync(tasks);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user