Skip to content

Commit

Permalink
actually delete instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan219 committed Jul 5, 2017
1 parent 8073ccf commit 1095a55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/models/services/cluster-config-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,9 @@ module.exports = class ClusterConfigService {
log.info('called')
return AutoIsolationConfig.findByIdAndAssert(clusterId)
.tap((cluster) => {
const instancesIds = cluster.instancesIds || []
const instancesIds = [cluster.instance.id]
instancesIds.concat(cluster.requestedDependencies.map(dep => dep.instance))

return Promise.each(instancesIds, (instanceId) => rabbitMQ.deleteInstance({ instanceId }))
})
.tap(() => {
Expand Down

0 comments on commit 1095a55

Please sign in to comment.