1
0
mirror of https://github.com/newnius/YAO-portal.git synced 2025-06-06 07:11:54 +00:00
This commit is contained in:
Newnius 2020-06-21 13:08:22 +08:00
parent ced80257d5
commit 929ab65321

View File

@ -158,7 +158,11 @@ function job_predict_req(CRObject $job)
$spider->doGet(YAO_SCHEDULER_ADDR . '?action=job_predict_req&name=' . $job->get('name') . '&cmd=' . $job->get('cmd'));
$msg = json_decode($spider->getBody(), true);
var_dump($msg);
if ($msg === NULL) {
$res['errno'] = Code::UNKNOWN_ERROR;
$res['msg'] = 'response is null';
return $res;
}
if ($msg['code'] !== 0) {
$res['errno'] = $msg['code'];