Skip to content

Commit bb51008

Browse files
committed
#2956 timeout
1 parent 9f4968f commit bb51008

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/God.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ God.executeApp = function executeApp(env, cb) {
227227
var old_env = God.clusters_db[clu.pm2_env.pm_id];
228228
if (old_env) old_env = null;
229229

230-
var proc = God.clusters_db[env_copy.pm_id] = clu;
230+
God.clusters_db[env_copy.pm_id] = clu;
231231

232232
clu.once('error', function cluError(err) {
233233
console.error(err.stack || err);
234-
proc.pm2_env.status = cst.ERRORED_STATUS;
234+
clu.pm2_env.status = cst.ERRORED_STATUS;
235235
try {
236236
clu.kill && clu.kill();
237237
}
@@ -245,7 +245,7 @@ God.executeApp = function executeApp(env, cb) {
245245
if (clu.connected === true)
246246
clu.disconnect && clu.disconnect();
247247
clu._reloadLogs = null;
248-
return God.handleExit(proc, code || 0, signal);
248+
return God.handleExit(clu, code || 0, signal);
249249
});
250250

251251
if (!clu.pm2_env.wait_ready)
@@ -259,8 +259,8 @@ God.executeApp = function executeApp(env, cb) {
259259

260260
var listener = function (packet) {
261261
if (packet.raw === 'ready' &&
262-
packet.process.name === proc.pm2_env.name &&
263-
packet.process.pm_id === proc.pm2_env.pm_id) {
262+
packet.process.name === clu.pm2_env.name &&
263+
packet.process.pm_id === clu.pm2_env.pm_id) {
264264
clearTimeout(ready_timeout);
265265
God.bus.removeListener('process:msg', listener)
266266
return readyCb(clu)

test/programmatic/graceful.mocha.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('Wait ready / Graceful start / restart', function() {
3939
pm2.list(function(err, apps) {
4040
should(apps[0].pm2_env.status).eql('launching');
4141
});
42-
}, 200);
42+
}, 800);
4343

4444
setTimeout(function() {
4545
pm2.list(function(err, apps) {
@@ -128,7 +128,7 @@ describe('Wait ready / Graceful start / restart', function() {
128128
pm2.list(function(err, apps) {
129129
should(apps[0].pm2_env.status).eql('launching');
130130
});
131-
}, 200);
131+
}, 800);
132132

133133
setTimeout(function() {
134134
pm2.list(function(err, apps) {

0 commit comments

Comments
 (0)