$stmt = $db->prepare(self::SQL_FETCH_EVALUATION); $stmt->execute(); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $value) { $st0 = $db->prepare(self::SQL_SET_TEMP_INFO); $st0->bindValue(':id', $value['id'], PDO::PARAM_STR); $st0->execute(); $st = $db->prepare(self::SQL_GET_INFO); $st->bindValue(':evaluation_id', $value['id'], PDO::PARAM_STR); $st->execute(); $row = $st->fetch(PDO::FETCH_ASSOC); $model_body = $row['mbody']; $index_path = $row['path']; $query_path = $row['query_path']; $judgement_path = $row['evaluation_path']; $status_code; $status_msg; $performances_str; $this->evaluate_using_docker($model_body, $index_path, $query_path, $judgement_path, $status_code, $status_msg, $performances_str); //var_dump($status_code); //var_dump($status_msg); $this->update_evaluation_status($status_code, $status_msg, $performances_str, $value['id']); } } catch (PDOException $Exception) { throw new RuleException($Exception->getMessage(), 401); } } } $deamon = new Deamon(); $deamon->evaluate_model();