From dd2a8e9224470a697cb2d2f117d06eee7aec9bdb Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sat, 23 Aug 2014 21:19:15 -0700 Subject: [PATCH] Resume all docker apps on startup Fixes #64 --- src/apps.js | 1 - src/apptask.js | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps.js b/src/apps.js index c2627b787..52e1b8e9a 100644 --- a/src/apps.js +++ b/src/apps.js @@ -42,7 +42,6 @@ function resume() { appdb.getAll(function (error, apps) { if (error) throw error; apps.forEach(function (app) { - if (app.installationState === appdb.ISTATE_INSTALLED) return; debug('Creating process for ' + app.id + ' with state ' + app.installationState); tasks[app.id] = child_process.fork(__dirname + '/apptask.js', [ app.id ]); }); diff --git a/src/apptask.js b/src/apptask.js index ca521914b..54f8a033b 100644 --- a/src/apptask.js +++ b/src/apptask.js @@ -609,6 +609,7 @@ function startTask(appId, callback) { if (app.runState === appdb.RSTATE_PENDING_STOP) { stopApp(app, callback); } else { + debug('Resuming app : %s', app.id); runApp(app, callback); }