added get balance api
Former-commit-id: 2c8df408652a3e2bede8652ff11e9460ba8fc7e0
This commit is contained in:
parent
4555a50afa
commit
130b116b52
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue