|
|
|
@@ -32,6 +32,18 @@ type TaskReq struct { |
|
|
|
BDName string //原数据集名称 |
|
|
|
} |
|
|
|
|
|
|
|
type ReturnMsg struct { |
|
|
|
Code string `json:"code"` |
|
|
|
Msg string `json:"msg"` |
|
|
|
Data ReturnData `json:"data"` |
|
|
|
Times int64 `json:"times"` |
|
|
|
} |
|
|
|
type ReturnData struct { |
|
|
|
No string `json:"no"` |
|
|
|
Code int `json:"code"` |
|
|
|
Status int `json:"status"` |
|
|
|
} |
|
|
|
|
|
|
|
const ( |
|
|
|
APPID = "1" |
|
|
|
LogPageSize = 500 |
|
|
|
@@ -206,18 +218,6 @@ func GetAlgorithmList() (map[string]interface{}, error) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
type ReturnMsg struct { |
|
|
|
code string |
|
|
|
msg string |
|
|
|
data ReturnData |
|
|
|
times int64 |
|
|
|
} |
|
|
|
type ReturnData struct { |
|
|
|
no string |
|
|
|
code int |
|
|
|
status int |
|
|
|
} |
|
|
|
|
|
|
|
func GetTaskStatus(jobID string) (*ReturnMsg, error) { |
|
|
|
checkSetting() |
|
|
|
client := getRestyClient() |
|
|
|
@@ -243,7 +243,7 @@ func GetTaskStatus(jobID string) (*ReturnMsg, error) { |
|
|
|
} else { |
|
|
|
var reMap *ReturnMsg |
|
|
|
err = json.Unmarshal(res.Body(), reMap) |
|
|
|
if err == nil && reMap.code == "0" { |
|
|
|
if err == nil { |
|
|
|
return reMap, nil |
|
|
|
} else { |
|
|
|
return nil, fmt.Errorf("get error,code not 0") |
|
|
|
|