Properly stop and remove containers.

This commit is contained in:
Page 2014-04-26 03:16:45 +01:00 committed by Pablo Carranza Vélez
parent 238768e7d4
commit 5482b9208d

View File

@ -154,7 +154,7 @@ exports.update = ->
knex('app').update(app).where(imageId: app.imageId)
# And delete all the ones to remove in one go
promises.push(
Promise.all(toBeRemoved.map(kill))
Promise.map(toBeRemoved, (imageId) -> kill(remoteApps[imageId]))
.then ->
knex('app').whereIn('imageId', toBeRemoved).delete()
)