Removes un-necessary shutdown handler (#3786)

* Removes un-necessary shutdown handler

- When registering a shutdown hander, the node process has to be exited manually which causes issues for many users

* Proper graceful shutdown from CLI
This commit is contained in:
Florent Vilmart
2017-05-08 13:06:01 -04:00
committed by Arthur Cinader
parent 864d191d0c
commit 8d67776c2e
3 changed files with 18 additions and 14 deletions

View File

@@ -313,6 +313,13 @@ class ParseServer {
return ParseServer.app(this.config);
}
handleShutdown() {
const { adapter } = this.config.databaseController;
if (adapter && typeof adapter.handleShutdown === 'function') {
adapter.handleShutdown();
}
}
static app({maxUploadSize = '20mb', appId}) {
// This app serves the Parse API directly.
// It's the equivalent of https://api.parse.com/1 in the hosted Parse API.