feat: midjourney page task and image list component is ready

This commit is contained in:
RockYang
2023-09-15 17:40:39 +08:00
parent 39dbffd8d0
commit e0a62d9b35
15 changed files with 458 additions and 56 deletions

View File

@@ -21,6 +21,10 @@ const MjRunningJobKey = "MidJourney_Running_Job"
type TaskType string
func (t TaskType) String() string {
return string(t)
}
const (
Image = TaskType("image")
Upscale = TaskType("upscale")
@@ -100,9 +104,9 @@ func (s *MjService) Run() {
}
if err != nil {
logger.Error("绘画任务执行失败:", err)
if task.RetryCount > 5 {
continue
}
//if task.RetryCount > 5 {
// continue
//}
task.RetryCount += 1
s.taskQueue.RPush(task)
// TODO: 执行失败通知聊天客户端