mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-31 16:35:23 +00:00
Set containerId to null if container gets removed after a failed start attempt
This commit is contained in:
parent
4e3106154d
commit
809609dd76
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user