fix: graceful shutdown (#3821)
* fix: missing graceful shutdown handler * fix: asar - use async fs operation * fix: scheduler - graceful shutdown and wait for running jobs to complete
This commit is contained in:
@@ -33,3 +33,16 @@ WIKI.logger = require('./core/logger').init('MASTER')
|
||||
// ----------------------------------------
|
||||
|
||||
WIKI.kernel.init()
|
||||
|
||||
// ----------------------------------------
|
||||
// Register exit handler
|
||||
// ----------------------------------------
|
||||
|
||||
process.on('SIGINT', () => {
|
||||
WIKI.kernel.shutdown()
|
||||
})
|
||||
process.on('message', (msg) => {
|
||||
if (msg === 'shutdown') {
|
||||
WIKI.kernel.shutdown()
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user