From 655ee7ea5f5c1f2f0ef955c95f7569362a17f696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Fri, 21 Mar 2025 17:11:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20NodeSubscriptionJob?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=BB=E5=8A=A1=E6=97=B6=E5=8E=BB=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VideoAnalysis/Expand/CoravelExpand.cs | 2 +- VideoAnalysisCore/Job/NodeSubscriptionJob.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VideoAnalysis/Expand/CoravelExpand.cs b/VideoAnalysis/Expand/CoravelExpand.cs index 482bac2..5d5e663 100644 --- a/VideoAnalysis/Expand/CoravelExpand.cs +++ b/VideoAnalysis/Expand/CoravelExpand.cs @@ -29,7 +29,7 @@ namespace Learn.VideoAnalysis.Expand //每5分钟执行一次 未处理视频扫描 scheduler.Schedule().EveryFiveMinutes(); //文件包分析 - scheduler.Schedule().HourlyAt(20); + scheduler.Schedule().HourlyAt(10); //任务缓存清理 // scheduler.Schedule().HourlyAt(10); }); diff --git a/VideoAnalysisCore/Job/NodeSubscriptionJob.cs b/VideoAnalysisCore/Job/NodeSubscriptionJob.cs index c7a20cd..c6841d4 100644 --- a/VideoAnalysisCore/Job/NodeSubscriptionJob.cs +++ b/VideoAnalysisCore/Job/NodeSubscriptionJob.cs @@ -37,6 +37,7 @@ namespace VideoAnalysisCore.Job { Console.WriteLine($"{DateTime.Now} Invoke=>{this.GetType().FullName}"); + var videoIdArr = videotaskDB.AsQueryable().Select(v => v.TagId).Distinct().ToArray(); var tasks = await nodesubscriptionDB.GetListAsync(s => s.Enable && s.Subject ==SubjectEnum.数学); foreach (var item in tasks) { @@ -78,6 +79,8 @@ namespace VideoAnalysisCore.Job var videos = new List(data.Count); foreach (var s in data) { + if (videoIdArr.Contains(s.VideoCode)) + continue; videos.Add(new VideoTask() { Id = YitIdHelper.NextId(),