Created
November 10, 2018 17:33
-
-
Save micheleriva/d0a03de957c53cc31b3104c6def88711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cluster.on('online', (worker) => log(`Worker ${worker.process.pid} is online`)) | |
cluster.on('exit', (worker, exitCode) => { | |
log(`Worker ${worker.process.id} exited with code ${exitCode}`) | |
log(`Starting a new worker`) | |
cluster.fork() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment