优化 任务失败也列入清理队列
This commit is contained in:
parent
ecca0751ef
commit
7f98327020
|
|
@ -21,7 +21,7 @@
|
|||
<ColumnDefinitions Context="row">
|
||||
<Selection />
|
||||
<PropertyColumn Property="c=>c.Id" Width="110px" Filterable="true" Sortable="true" />
|
||||
<PropertyColumn Property="c=>c.TagId" Width="160px" />
|
||||
<PropertyColumn Property="c=>c.TagId" Width="160px" Filterable="true" />
|
||||
<PropertyColumn Property="c=>c.VideoType" Width="100px" />
|
||||
<PropertyColumn Property="c=>c.LastEnum" Width="150px" />
|
||||
<PropertyColumn Property="c=>c.Subject" Width="100px" />
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ namespace Learn.VideoAnalysis.Expand
|
|||
provider.ApplicationServices.UseScheduler(scheduler =>
|
||||
{
|
||||
//任务缓存清理
|
||||
//scheduler.Schedule<TaskFileClearJob>().HourlyAt(10);
|
||||
scheduler.Schedule<TaskFileClearJob>().DailyAt(1,0);
|
||||
scheduler.Schedule<TaskFileClearJob>().HourlyAt(10);
|
||||
//scheduler.Schedule<TaskFileClearJob>().DailyAt(1,0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -442,8 +442,12 @@ namespace VideoAnalysisCore.AICore.GPT.DeepSeek
|
|||
continue;
|
||||
if (sRes.Result.res.value.Trim().Length < 10)//总试题内容长度小于10 视为无效题目
|
||||
break;
|
||||
|
||||
#if DEBUG
|
||||
Console.WriteLine(DateTime.Now + $"=>{taskInfo.Id} 提取{knowInfoArr.StartTime}秒试题的试题内容");
|
||||
Console.WriteLine(sRes.Result.res.value);
|
||||
#endif
|
||||
|
||||
//var knowArr=JsonSerializer.Serialize(knowInfoArr.Select(s => new { s.KnowPointId, s.KnowPoint }));
|
||||
var resFormat = """[{"Type":string(试题类型),"TopicStem":string(试题题干),"QuestionArr":[{"Question":string(子问题),"KnowPointId":(string)知识点ID}]}]""";
|
||||
var postMessages =
|
||||
|
|
|
|||
|
|
@ -32,16 +32,19 @@ namespace VideoAnalysisCore.Job
|
|||
{
|
||||
try
|
||||
{
|
||||
var startTime = -2;
|
||||
var timeSpan = startTime - 3;
|
||||
var startTime = -1;
|
||||
var timeSpan = startTime - 999;
|
||||
// 计算 2 天前的时间
|
||||
DateTime twoDaysAgo = DateTime.Now.AddDays(startTime);
|
||||
DateTime endDaysAgo = DateTime.Now.AddDays(timeSpan);
|
||||
|
||||
// 查询 2 天前任务执行完成的记录
|
||||
var completedTasks = videotaskDB.AsQueryable()
|
||||
.Where(t =>
|
||||
t.LastEnum == Model.Enum.RedisChannelEnum.结束任务
|
||||
.Where(t => (
|
||||
//筛选 结束任务 或者 错误任务
|
||||
t.LastEnum == Model.Enum.RedisChannelEnum.结束任务 ||
|
||||
t.ErrorMessage != null
|
||||
)
|
||||
&& t.EndTime < twoDaysAgo
|
||||
&& t.EndTime > endDaysAgo)
|
||||
.ToList();
|
||||
|
|
|
|||
Loading…
Reference in New Issue