mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-07 15:39:45 +02:00
pass all env variables to worker
This commit is contained in:
10
loader.js
10
loader.js
@@ -169,13 +169,13 @@ function forkWorker(index, isPrimary) {
|
||||
return console.log('[cluster] invalid port for worker : ' + index + ' ports: ' + ports.length);
|
||||
}
|
||||
|
||||
process.env.isPrimary = isPrimary;
|
||||
process.env.isCluster = true;
|
||||
process.env.port = ports[index];
|
||||
|
||||
var worker = fork('app.js', [], {
|
||||
silent: silent,
|
||||
env: {
|
||||
isPrimary: isPrimary,
|
||||
isCluster: true,
|
||||
port: ports[index]
|
||||
}
|
||||
env: process.env
|
||||
});
|
||||
|
||||
worker.index = index;
|
||||
|
||||
Reference in New Issue
Block a user