shutdown gracefully when sigint is recieved
This commit is contained in:
parent
2f5f066588
commit
208f2c2d01
1 changed files with 5 additions and 0 deletions
|
@ -145,4 +145,9 @@ process.on('uncaughtException', (error) => {
|
||||||
|
|
||||||
process.on('unhandledRejection', err => {
|
process.on('unhandledRejection', err => {
|
||||||
client.logger.error('UNHANDLED_PROMISE_ERROR', err.stack);
|
client.logger.error('UNHANDLED_PROMISE_ERROR', err.stack);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Shut down gracefully when SIGINT is recieved
|
||||||
|
process.on('SIGINT', () => {
|
||||||
|
client.functions.shutdown();
|
||||||
});
|
});
|
Loading…
Reference in a new issue