feat: add err_msg field for mj and sd jobs

This commit is contained in:
RockYang
2024-01-26 14:50:36 +08:00
parent 96785ca037
commit 6d85d128cc
12 changed files with 50 additions and 16 deletions

View File

@@ -217,7 +217,10 @@ func (p *ServicePool) SyncTaskProgress() {
}
// 任务失败了
if task.FailReason != "" {
p.db.Model(&model.MidJourneyJob{Id: v.Id}).UpdateColumn("progress", -1)
p.db.Model(&model.MidJourneyJob{Id: v.Id}).UpdateColumns(map[string]interface{}{
"progress": -1,
"err_msg": task.FailReason,
})
continue
}
if len(task.Buttons) > 0 {