Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan219 committed Jun 30, 2017
1 parent 17d0456 commit 3147e1f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/routes/docker-compose-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ const postRoute = function (req, res, next) {
/**
* Takes the result from parsing the compose, and turns them into cluster create jobs
* @param {SessionUser} sessionUser - This user
* @param {Object} body - Cluster create options
* @param {Object} createClusterOptions - From the request body, the options for these new clusters
* @param {Object} serviceNames
* @param {String[]} serviceNames.builds - Clusters created from the owning repo
* @param {String[]} serviceNames.externals - Clusters created from github links
* @param {Number} serviceNames.total - Total number of clusters to be generated
*/
function createClusters (sessionUser, body, serviceNames) {
function createClusters (sessionUser, createClusterOptions, serviceNames) {
return Promise.map(serviceNames, (service) => {
const newBody = Object.assign({name: generateHashClusterName()}, body)
return rabbitMQ.createCluster(makeCreateOptsFromBody(sessionUser, newBody, service))
.return({ service: service, hash: newBody.name })
const opts = Object.assign({name: generateHashClusterName()}, createClusterOptions)
return rabbitMQ.createCluster(makeCreateOptsFromBody(sessionUser, opts, service))
.return({ service: service, hash: opts.name })
})
}

Expand Down

0 comments on commit 3147e1f

Please sign in to comment.