Explorar el Código

Merge pull request #167 from weikecloud/main

增加MJ上游构图失败判断
Calcium-Ion hace 1 año
padre
commit
87919b032d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      controller/midjourney.go

+ 1 - 1
controller/midjourney.go

@@ -147,7 +147,7 @@ func UpdateMidjourneyTaskBulk() {
 					task.Buttons = string(buttonStr)
 				}
 
-				if task.Progress != "100%" && responseItem.FailReason != "" {
+				if (task.Progress != "100%" && responseItem.FailReason != "") || (task.Progress == "100%" && task.Status == "FAILURE") {
 					common.LogInfo(ctx, task.MjId+" 构建失败,"+task.FailReason)
 					task.Progress = "100%"
 					err = model.CacheUpdateUserQuota(task.UserId)