From 50137c163dc9e5c8281b9c894e95d031420d8a4c Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Fri, 4 Dec 2015 23:27:45 +0000 Subject: [PATCH] Bugfix: assign app.containerId before attaching logger --- src/application.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/application.coffee b/src/application.coffee index e52dc34f..ab0fc57f 100644 --- a/src/application.coffee +++ b/src/application.coffee @@ -225,11 +225,11 @@ application.start = start = (app) -> logSystemEvent(logTypes.startAppError, app, err) throw err .then -> + app.containerId = container.id device.updateState(commit: app.commit) logger.attach(app) .tap (container) -> # Update the app info, only if starting the container worked. - app.containerId = container.id knex('app').update(app).where(appId: app.appId) .then (affectedRows) -> knex('app').insert(app) if affectedRows == 0