updated textinfer api
Former-commit-id: d0c9203bfb6af1f141e9bf2468d35cc1ab642084
This commit is contained in:
parent
ee58f60bc6
commit
fd0e823490
|
@ -106,6 +106,16 @@ func (l *TextToTextInferenceLogic) TextToTextInference(req *types.TextToTextInfe
|
|||
cs = append(cs, s)
|
||||
}
|
||||
|
||||
if len(cs) == 0 {
|
||||
clusterId := opt.AiClusterIds[0]
|
||||
clusterName, _ := l.svcCtx.Scheduler.AiStorages.GetClusterNameById(opt.AiClusterIds[0])
|
||||
err := l.svcCtx.Scheduler.AiStorages.SaveAiTask(id, opt, adapterName, clusterId, clusterName, "", constants.Failed, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
l.svcCtx.Scheduler.AiStorages.AddNoticeInfo(opt.AdapterId, adapterName, "", "", opt.TaskName, "failed", "任务失败")
|
||||
}
|
||||
|
||||
for _, c := range cs {
|
||||
clusterName, _ := l.svcCtx.Scheduler.AiStorages.GetClusterNameById(c.clusterId)
|
||||
err := l.svcCtx.Scheduler.AiStorages.SaveAiTask(id, opt, adapterName, c.clusterId, clusterName, "", constants.Saved, "")
|
||||
|
|
Loading…
Reference in New Issue