mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add catcher for PM2 graceful shutdown
This commit is contained in:
parent
fcf757f715
commit
0622be843b
3
packages/node_modules/node-red/red.js
vendored
3
packages/node_modules/node-red/red.js
vendored
@ -353,3 +353,6 @@ process.on('SIGTERM', brexit);
|
|||||||
process.on('SIGHUP', brexit);
|
process.on('SIGHUP', brexit);
|
||||||
process.on('SIGUSR2', brexit); // for nodemon restart
|
process.on('SIGUSR2', brexit); // for nodemon restart
|
||||||
process.on('SIGBREAK', brexit); // for windows ctrl-break
|
process.on('SIGBREAK', brexit); // for windows ctrl-break
|
||||||
|
process.on('message', function(m) { // for PM2 under window with --shutdown-with-message
|
||||||
|
if (m === 'shutdown') { brexit }
|
||||||
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user