Merge pull request #883 from balena-io/fix-promise-map

Wrap services.getAll in a bluebird promise
This commit is contained in:
CameronDiver 2019-02-03 11:52:46 +00:00 committed by GitHub
commit 652080ae8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -882,7 +882,7 @@ module.exports = class ApplicationManager extends EventEmitter
return _.uniqWith(nextSteps, _.isEqual)
stopAll: ({ force = false, skipLock = false } = {}) =>
@services.getAll()
Promise.resolve(@services.getAll())
.map (service) =>
@_lockingIfNecessary service.appId, { force, skipLock }, =>
@services.kill(service, { removeContainer: false, wait: true })