Skip to content

Commit

Permalink
Update ActionMethods.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jshkurti committed Nov 21, 2014
1 parent 197781e commit c0143cc
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions lib/God/ActionMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,15 +494,19 @@ module.exports = function(God) {

console.log('Reloading logs for process id %d', id);

if (cluster.pm2_env.exec_mode == 'cluster_mode') {
cluster.send({
type:'log:reload'
});
}
else if (cluster._reloadLogs) {
cluster._reloadLogs(function(err) {
if (err) God.logAndGenerateError(err);
});
if (cluster &&
cluster.pm2_env) {
if (cluster.send &&
cluster.pm2_env.exec_mode == 'cluster_mode') {
cluster.send({
type:'log:reload'
});
}
else if (cluster._reloadLogs) {
cluster._reloadLogs(function(err) {
if (err) God.logAndGenerateError(err);
});
}
}
});

Expand Down

0 comments on commit c0143cc

Please sign in to comment.