Commit 7eb6ad4c authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update retry msg

parent a2dfb5cd
...@@ -59,6 +59,7 @@ type Task struct { ...@@ -59,6 +59,7 @@ type Task struct {
Status string `json:"status"` Status string `json:"status"`
TelegramActiveThreshold int `json:"telegramActiveThreshold"` // 仅电报活跃可用 TelegramActiveThreshold int `json:"telegramActiveThreshold"` // 仅电报活跃可用
Enable bool `json:"enable"` Enable bool `json:"enable"`
Msg string `json:"msg"`
} }
type CreateTaskRequest struct { type CreateTaskRequest struct {
......
package service package service
import ( import (
"taskcenter/constant"
apiModel "taskcenter/model/api" apiModel "taskcenter/model/api"
dbModel "taskcenter/model/db" dbModel "taskcenter/model/db"
"taskcenter/util" "taskcenter/util"
...@@ -79,6 +80,9 @@ func (s *Service) GetGroup(gid int, userId string, admin bool) (resp *apiModel.G ...@@ -79,6 +80,9 @@ func (s *Service) GetGroup(gid int, userId string, admin bool) (resp *apiModel.G
return nil, err return nil, err
} }
_task.Status = status _task.Status = status
if status == constant.TaskHistoryStatusRetry {
_task.Msg = "The task is not completed, please try again."
}
resp.Tasks = append(resp.Tasks, _task) resp.Tasks = append(resp.Tasks, _task)
} }
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment