diff --git a/engine/commands/run_cmd.cc b/engine/commands/run_cmd.cc index 1c7e5c7e6..a84393652 100644 --- a/engine/commands/run_cmd.cc +++ b/engine/commands/run_cmd.cc @@ -70,7 +70,6 @@ bool RunCmd::IsModelExisted(const std::string& model_id) { try { config::YamlHandler handler; handler.ModelConfigFromFile(entry.path().string()); - std::cout << entry.path().stem().string() << std::endl; if (entry.path().stem().string() == model_id) { return true; } diff --git a/engine/controllers/processManager.cc b/engine/controllers/processManager.cc index 2874a3860..15c213453 100644 --- a/engine/controllers/processManager.cc +++ b/engine/controllers/processManager.cc @@ -1,11 +1,17 @@ #include "processManager.h" -#include +#include "utils/cortex_utils.h" + #include +#include void processManager::destroy( - const HttpRequestPtr &req, - std::function &&callback) { + const HttpRequestPtr& req, + std::function&& callback) { + app().quit(); + Json::Value ret; + ret["message"] = "Program is exitting, goodbye!"; + auto resp = cortex_utils::CreateCortexHttpJsonResponse(ret); + resp->setStatusCode(k200OK); + callback(resp); LOG_INFO << "Program is exitting, goodbye!"; - exit(0); - return; };