mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-20 01:16:36 +08:00
Update midjourney.go
This commit is contained in:
parent
706449dede
commit
f7a4f18aff
@ -5,6 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -15,8 +16,6 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func UpdateMidjourneyTaskBulk() {
|
func UpdateMidjourneyTaskBulk() {
|
||||||
@ -148,7 +147,7 @@ func UpdateMidjourneyTaskBulk() {
|
|||||||
task.Buttons = string(buttonStr)
|
task.Buttons = string(buttonStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
err = model.CacheUpdateUserQuota(task.UserId)
|
||||||
|
Loading…
Reference in New Issue
Block a user