Support: serverCloseComplete option (#5937)
* Support: serverCloseComplete option Callback when server has fully shutdown. Please check that all cases are covered. * handle error on startup * fix tests * test workaround * remove serverCloseComplete chech on startup failure
This commit is contained in:
@@ -330,6 +330,14 @@ module.exports.ParseServerOptions = {
|
||||
action: parsers.numberParser('schemaCacheTTL'),
|
||||
default: 5000,
|
||||
},
|
||||
serverCloseComplete: {
|
||||
env: 'PARSE_SERVER_SERVER_CLOSE_COMPLETE',
|
||||
help: 'Callback when server has closed',
|
||||
},
|
||||
serverStartComplete: {
|
||||
env: 'PARSE_SERVER_SERVER_START_COMPLETE',
|
||||
help: 'Callback when server has started',
|
||||
},
|
||||
serverURL: {
|
||||
env: 'PARSE_SERVER_URL',
|
||||
help: 'URL to your parse server with http:// or https://.',
|
||||
|
||||
@@ -59,6 +59,8 @@
|
||||
* @property {Boolean} revokeSessionOnPasswordReset When a user changes their password, either through the reset password email or while logged in, all sessions are revoked if this is true. Set to false if you don't want to revoke sessions.
|
||||
* @property {Boolean} scheduledPush Configuration for push scheduling, defaults to false.
|
||||
* @property {Number} schemaCacheTTL The TTL for caching the schema for optimizing read/write operations. You should put a long TTL when your DB is in production. default to 5000; set 0 to disable.
|
||||
* @property {Function} serverCloseComplete Callback when server has closed
|
||||
* @property {Function} serverStartComplete Callback when server has started
|
||||
* @property {String} serverURL URL to your parse server with http:// or https://.
|
||||
* @property {Number} sessionLength Session duration, in seconds, defaults to 1 year
|
||||
* @property {Boolean} silent Disables console output
|
||||
|
||||
@@ -199,8 +199,10 @@ export interface ParseServerOptions {
|
||||
:ENV: PARSE_SERVER_PLAYGROUND_PATH
|
||||
:DEFAULT: /playground */
|
||||
playgroundPath: ?string;
|
||||
|
||||
/* Callback when server has started */
|
||||
serverStartComplete: ?(error: ?Error) => void;
|
||||
/* Callback when server has closed */
|
||||
serverCloseComplete: ?() => void;
|
||||
}
|
||||
|
||||
export interface CustomPagesOptions {
|
||||
|
||||
Reference in New Issue
Block a user