mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
NodeJS cluster: Delay child process auto restart 10 seconds on exit.
refs #108
This commit is contained in:
parent
6d67fbde84
commit
2c3b02a682
@ -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…
Reference in New Issue
Block a user