|
@@ -13,16 +13,16 @@ if (process.env.TFB_TEST_NAME === 'nodejs-mongodb') {
|
|
|
process.env.NODE_HANDLER = 'sequelize-postgres';
|
|
|
}
|
|
|
|
|
|
-if (cluster.isMaster) {
|
|
|
+if (cluster.isPrimary) {
|
|
|
+ console.log(`Primary ${process.pid} is running`);
|
|
|
+
|
|
|
// Fork workers.
|
|
|
for (let i = 0; i < numCPUs; i++) {
|
|
|
cluster.fork();
|
|
|
}
|
|
|
|
|
|
cluster.on('exit', (worker, code, signal) => {
|
|
|
- console.log([
|
|
|
- 'A process exit was triggered, most likely due to a failed database action',
|
|
|
- 'NodeJS test server shutting down now'].join('\n'));
|
|
|
+ console.log(`worker ${worker.process.pid} died`);
|
|
|
process.exit(1);
|
|
|
});
|
|
|
} else {
|