|
|
@@ -144,9 +144,9 @@ func UpdateTaskStatus(svc *svc.ServiceContext, tasklist []*types.TaskModel) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if count == len(aiTask) { |
|
|
|
|
|
status = constants.Succeeded |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//if count == len(aiTask) { |
|
|
|
|
|
// status = constants.Succeeded |
|
|
|
|
|
//} |
|
|
|
|
|
|
|
|
if status != "" { |
|
|
if status != "" { |
|
|
task.Status = status |
|
|
task.Status = status |
|
|
@@ -288,6 +288,8 @@ func updateInferTaskStatus(svc *svc.ServiceContext, task types.TaskModel) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func UpdateAiTask(svc *svc.ServiceContext, aiTaskList ...*models.TaskAi) { |
|
|
func UpdateAiTask(svc *svc.ServiceContext, aiTaskList ...*models.TaskAi) { |
|
|
|
|
|
svc.Scheduler.AiService.TaskSyncLock.Lock() |
|
|
|
|
|
defer svc.Scheduler.AiService.TaskSyncLock.Unlock() |
|
|
var wg sync.WaitGroup |
|
|
var wg sync.WaitGroup |
|
|
for _, aitask := range aiTaskList { |
|
|
for _, aitask := range aiTaskList { |
|
|
t := aitask |
|
|
t := aitask |
|
|
@@ -388,6 +390,8 @@ func UpdateAiTaskStatus(svc *svc.ServiceContext, tasklist []*types.TaskModel) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func UpdateTrainingTaskStatus(svc *svc.ServiceContext, list []*types.AdapterInfo) { |
|
|
func UpdateTrainingTaskStatus(svc *svc.ServiceContext, list []*types.AdapterInfo) { |
|
|
|
|
|
svc.Scheduler.AiService.TaskSyncLock.Lock() |
|
|
|
|
|
defer svc.Scheduler.AiService.TaskSyncLock.Unlock() |
|
|
var wg sync.WaitGroup |
|
|
var wg sync.WaitGroup |
|
|
for _, adapter := range list { |
|
|
for _, adapter := range list { |
|
|
taskList, err := svc.Scheduler.AiStorages.GetAiTasksByAdapterId(adapter.Id) |
|
|
taskList, err := svc.Scheduler.AiStorages.GetAiTasksByAdapterId(adapter.Id) |
|
|
|