mirror of
https://github.com/mempool/mempool.git
synced 2025-02-23 22:46:54 +01:00
NodeJS cluster: Delay child process auto restart 10 seconds on exit.
refs #108
This commit is contained in:
parent
6d67fbde84
commit
2c3b02a682
1 changed files with 2 additions and 2 deletions
|
@ -41,8 +41,8 @@ class Server {
|
|||
}
|
||||
|
||||
cluster.on('exit', (worker, code, signal) => {
|
||||
console.log(`Mempool Worker #${worker.process.pid} died. Restarting...`, signal || code);
|
||||
cluster.fork();
|
||||
console.log(`Mempool Worker #${worker.process.pid} died. Restarting in 10 seconds...`, signal || code);
|
||||
setTimeout(() => { cluster.fork(); }, 10000);
|
||||
});
|
||||
} else {
|
||||
this.startServer(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue