mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-17 16:06:38 +08:00
chore: mj
This commit is contained in:
parent
ba27da9e2c
commit
a3880d558a
@ -150,15 +150,10 @@ func UpdateMidjourneyTaskBulk() {
|
|||||||
if (task.Progress != "100%" && responseItem.FailReason != "") || (task.Progress == "100%" && task.Status == "FAILURE") {
|
if (task.Progress != "100%" && responseItem.FailReason != "") || (task.Progress == "100%" && task.Status == "FAILURE") {
|
||||||
common.LogInfo(ctx, task.MjId+" 构建失败,"+task.FailReason)
|
common.LogInfo(ctx, task.MjId+" 构建失败,"+task.FailReason)
|
||||||
task.Progress = "100%"
|
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 {
|
if task.Quota != 0 {
|
||||||
shouldReturnQuota = true
|
shouldReturnQuota = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
err = task.Update()
|
err = task.Update()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
common.LogError(ctx, "UpdateMidjourneyTask task error: "+err.Error())
|
common.LogError(ctx, "UpdateMidjourneyTask task error: "+err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user