Set containerId to null if container gets removed after a failed start attempt

This commit is contained in:
Kostas Lekkas 2016-04-20 13:04:00 +03:00
parent 4e3106154d
commit 809609dd76

View File

@ -247,6 +247,9 @@ application.start = start = (app) ->
return return
# If starting the container failed, we remove it so that it doesn't litter # If starting the container failed, we remove it so that it doesn't litter
container.removeAsync(v: true) container.removeAsync(v: true)
.then ->
app.containerId = null
knex('app').update(app).where(appId: app.appId)
.finally -> .finally ->
logSystemEvent(logTypes.startAppError, app, err) logSystemEvent(logTypes.startAppError, app, err)
throw err throw err