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(),