-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c693e55
commit 8fdff72
Showing
2 changed files
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
#include "processManager.h" | ||
#include <cstdlib> | ||
#include "utils/cortex_utils.h" | ||
|
||
#include <trantor/utils/Logger.h> | ||
#include <cstdlib> | ||
|
||
void processManager::destroy( | ||
const HttpRequestPtr &req, | ||
std::function<void(const HttpResponsePtr &)> &&callback) { | ||
const HttpRequestPtr& req, | ||
std::function<void(const HttpResponsePtr&)>&& 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; | ||
}; |