修复 ppt类型文件分析完成回调失败
This commit is contained in:
parent
8ed02b9a79
commit
7ca52f3c97
|
|
@ -102,6 +102,9 @@ namespace VideoAnalysisCore.Controllers
|
||||||
continue;
|
continue;
|
||||||
if (videoIdArr.Contains(s.VideoCode))
|
if (videoIdArr.Contains(s.VideoCode))
|
||||||
continue;
|
continue;
|
||||||
|
var pptInfo = req.AnalyzeItems //»ñÈ¡ppt videoCode
|
||||||
|
.FirstOrDefault(x => x.AttachmentsInfoType == AttachmentsInfoType.PPT && s.StructurePageContentId == x.StructurePageContentId);
|
||||||
|
var pptCode = pptInfo?.VideoCode ?? (pptInfo?.VideoUrl??string.Empty);
|
||||||
videos.Add(new VideoTask()
|
videos.Add(new VideoTask()
|
||||||
{
|
{
|
||||||
Id = YitIdHelper.NextId(),
|
Id = YitIdHelper.NextId(),
|
||||||
|
|
@ -112,9 +115,7 @@ namespace VideoAnalysisCore.Controllers
|
||||||
TagId = s.VideoCode,
|
TagId = s.VideoCode,
|
||||||
MediaUrl =s.VideoUrl,
|
MediaUrl =s.VideoUrl,
|
||||||
MediaName = s.VideoName,
|
MediaName = s.VideoName,
|
||||||
PPTVideoCode = req.AnalyzeItems //»ñÈ¡ppt videoCode
|
PPTVideoCode = pptCode,
|
||||||
.FirstOrDefault(x => x.AttachmentsInfoType == AttachmentsInfoType.PPT && s.StructurePageContentId == x.StructurePageContentId)
|
|
||||||
?.VideoCode,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
await nodePackageInfoDB.InsertRangeAsync(nodePackages);
|
await nodePackageInfoDB.InsertRangeAsync(nodePackages);
|
||||||
|
|
|
||||||
|
|
@ -48,16 +48,21 @@ namespace VideoAnalysisCore.Job
|
||||||
.Where(s => s.EndTime != null)
|
.Where(s => s.EndTime != null)
|
||||||
.Select(s => s.TagId)
|
.Select(s => s.TagId)
|
||||||
.ToArrayAsync();
|
.ToArrayAsync();
|
||||||
|
|
||||||
|
var videoPPTArr = await videoTaskDB.AsQueryable()
|
||||||
|
.Where(s => s.EndTime != null)
|
||||||
|
.Select(s => s.PPTVideoCode)
|
||||||
|
.ToArrayAsync();
|
||||||
var postData = new List<NodePackageInfo>();
|
var postData = new List<NodePackageInfo>();
|
||||||
foreach (var item in taskArr)
|
foreach (var item in taskArr)
|
||||||
{
|
{
|
||||||
if (videoIdArr.Contains(item.VideoCode))
|
if (videoIdArr.Contains(item.VideoCode)|| videoPPTArr.Contains(item.VideoCode))
|
||||||
{
|
{
|
||||||
postData.Add(item);
|
postData.Add(item);
|
||||||
item.SuccessTime = DateTime.Now;
|
item.SuccessTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Console.WriteLine($"{DateTime.Now} 执行=>文件包任务 已完成任务回调 数量{postData.Count}");
|
Console.WriteLine($"{DateTime.Now} 执行=>文件包任务 任务回调 数量{postData.Count} ...");
|
||||||
if (postData.Count() == 0)
|
if (postData.Count() == 0)
|
||||||
return;
|
return;
|
||||||
//var responseMessage = await new HttpClient()
|
//var responseMessage = await new HttpClient()
|
||||||
|
|
@ -96,6 +101,7 @@ namespace VideoAnalysisCore.Job
|
||||||
await Task.Delay(1000);
|
await Task.Delay(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Console.WriteLine($"{DateTime.Now} 执行=>文件包任务 已完成任务回调 数量{postData.Count}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue