| @@ -978,6 +978,9 @@ service pcm { | |||||
| @handler GetComputeCardsByClusterHandler | @handler GetComputeCardsByClusterHandler | ||||
| get /schedule/getComputeCardsByCluster/:adapterId/:clusterId (GetComputeCardsByClusterReq) returns (GetComputeCardsByClusterResp) | get /schedule/getComputeCardsByCluster/:adapterId/:clusterId (GetComputeCardsByClusterReq) returns (GetComputeCardsByClusterResp) | ||||
| @handler GetClusterBalanceByIdHandler | |||||
| get /schedule/getClusterBalanceById/:adapterId/:clusterId (GetClusterBalanceByIdReq) returns (GetClusterBalanceByIdResp) | |||||
| } | } | ||||
| @server( | @server( | ||||
| @@ -141,4 +141,13 @@ type ( | |||||
| GetComputeCardsByClusterResp { | GetComputeCardsByClusterResp { | ||||
| Cards []string `json:"cards"` | Cards []string `json:"cards"` | ||||
| } | } | ||||
| GetClusterBalanceByIdReq{ | |||||
| AdapterId string `path:"adapterId"` | |||||
| ClusterId string `path:"clusterId"` | |||||
| } | |||||
| GetClusterBalanceByIdResp{ | |||||
| Balance float64 `json:"balance"` | |||||
| } | |||||
| ) | ) | ||||
| @@ -143,6 +143,11 @@ func (l *PageListTaskLogic) updateTaskStatus(tasks []*types.TaskModel, ch chan<- | |||||
| } | } | ||||
| } | } | ||||
| if len(aiTask) == 0 { | |||||
| ch <- struct{}{} | |||||
| return | |||||
| } | |||||
| start, _ := time.ParseInLocation(constants.Layout, aiTask[0].StartTime, time.Local) | start, _ := time.ParseInLocation(constants.Layout, aiTask[0].StartTime, time.Local) | ||||
| end, _ := time.ParseInLocation(constants.Layout, aiTask[0].EndTime, time.Local) | end, _ := time.ParseInLocation(constants.Layout, aiTask[0].EndTime, time.Local) | ||||