Skip to content

Commit

Permalink
add check for pm2 env / master mode
Browse files Browse the repository at this point in the history
  • Loading branch information
megastef authored Sep 22, 2016
1 parent e473012 commit 69fcd99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/httpServerAgent.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module.exports = function httpServerAgent () {
timer.reset()
reqSize = 0
resSize = 0
if (cluster.isMaster) {
if (cluster.isMaster || process.env.NODE_APP_INSTANCE === 0 || process.env.SPM_MASTER_MODE === 1)) {
agent.addMetrics({
ts: now,
name: 'numWorkers',
Expand Down

0 comments on commit 69fcd99

Please sign in to comment.