forked from JointCloud/pcm-hpc
bug fix
This commit is contained in:
parent
8a7118c81b
commit
0bf316e6e2
|
@ -88,18 +88,6 @@ type ContainerConf struct {
|
|||
GetNodeResources string
|
||||
}
|
||||
|
||||
//
|
||||
//type Adapter struct {
|
||||
// Name string `yaml:"Name"`
|
||||
// Address string `yaml:"Address"`
|
||||
// RpcAddress string `yaml:"RpcAddress"`
|
||||
// Type string `yaml:"Type"`
|
||||
// TenantId int `yaml:"TenantId"`
|
||||
// TenantName string `yaml:"TenantName"`
|
||||
// Labels Labels `yaml:"Labels"`
|
||||
// MetricsUrl string `yaml:"MetricsUrl"`
|
||||
//}
|
||||
|
||||
type Labels struct {
|
||||
Cloud string `yaml:"cloud"`
|
||||
}
|
||||
|
|
|
@ -145,6 +145,7 @@ func PullTaskInfo() {
|
|||
}
|
||||
if len(resp.Jobs) == 0 {
|
||||
log.Print("no such task exist in slurm")
|
||||
hpcInfo.Status = "COMPLETED"
|
||||
continue
|
||||
}
|
||||
hpcInfo.Status = resp.Jobs[0].JobState
|
||||
|
|
|
@ -68,11 +68,11 @@ func (j *job) ListDbJob() (getJobResp GetJobResp, err error) {
|
|||
return getJobResp, nil
|
||||
}
|
||||
|
||||
func (j *job) SubmitJob(jobOptions JobOptions) (submitJobResp SubmitJobResp, err error) {
|
||||
func (j *job) SubmitJob(proxyAddress string, jobOptions JobOptions) (submitJobResp SubmitJobResp, err error) {
|
||||
|
||||
url := j.client.url + "/slurm/" + j.client.clientVersion + "/job/submit"
|
||||
|
||||
httpClient := resty.New().R()
|
||||
httpClient := resty.New().SetProxy(proxyAddress).R()
|
||||
httpResp, err := httpClient.SetHeader("Content-Type", "application/json").
|
||||
SetHeader("Accept", "application/json").
|
||||
SetHeader("X-SLURM-USER-NAME", j.client.restUsername).
|
||||
|
|
Loading…
Reference in New Issue