added getComputeCards api

Former-commit-id: 78b5fa73e9106a813df8d05e57c1e5dfd0a219a4
This commit is contained in:
tzwang 2024-05-09 18:54:25 +08:00
parent 9ec3a048b0
commit fb957526e5
3 changed files with 13 additions and 1 deletions

View File

@ -972,6 +972,9 @@ service pcm {
@handler UploadAlgothmCodeHandler
post /schedule/getDownloadAlgothmCode (UploadAlgorithmCodeReq) returns (UploadAlgorithmCodeResp)
@handler GetComputeCardsByClusterHandler
get /schedule/getComputeCardsByCluster/:adapterId/:clusterId (GetComputeCardsByClusterReq) returns (GetComputeCardsByClusterResp)
}
@server(

View File

@ -129,4 +129,13 @@ type (
UploadAlgorithmCodeResp {
}
GetComputeCardsByClusterReq {
AdapterId string `path:"adapterId"`
ClusterId string `path:"clusterId"`
}
GetComputeCardsByClusterResp {
Cards []string `json:"cards"`
}
)

View File

@ -77,7 +77,7 @@ func (l *GetCenterTaskListLogic) GetCenterTaskList() (resp *types.CenterTaskList
select {
case _ = <-ch:
return resp, nil
case <-time.After(1 * time.Second):
case <-time.After(2 * time.Second):
return resp, nil
}