From a3880d558ad0aaa5913809348fac829255c62fea Mon Sep 17 00:00:00 2001 From: CalciumIon <1808837298@qq.com> Date: Mon, 15 Jul 2024 22:14:30 +0800 Subject: [PATCH] chore: mj --- controller/midjourney.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/controller/midjourney.go b/controller/midjourney.go index 1a8cd36..01ddb2f 100644 --- a/controller/midjourney.go +++ b/controller/midjourney.go @@ -150,13 +150,8 @@ func UpdateMidjourneyTaskBulk() { 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) - if err != nil { - common.LogError(ctx, "error update user quota cache: "+err.Error()) - } else { - if task.Quota != 0 { - shouldReturnQuota = true - } + if task.Quota != 0 { + shouldReturnQuota = true } } err = task.Update()