Skip to content

Commit e796660

Browse files
committed
Merge branch 'hotfix-dedupe' of github.com:CodeNow/api into hotfix-dedupe
2 parents 90f29fa + f47e892 commit e796660

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

lib/models/apis/docker.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,7 @@ Docker.prototype.createImageBuilderAndAttach = function (sessionUser, version, c
127127
'/cache': {}
128128
};
129129
}
130-
self.createContainer(builderContainerData, function (err, container) {
131-
debug('container created - ', 'err:', err, 'container:', container);
132-
if (err) { return cb(err); }
133-
var containerId = container.Id;
134-
135-
version.update({
136-
$set: { containerId: containerId }
137-
}, error.logIfErr);
138-
139-
cb(null, container);
140-
});
130+
self.createContainer(builderContainerData, cb);
141131
}
142132
};
143133

lib/routes/builds.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ var checkFound = require('middlewares/check-found');
2020
var Boom = mw.Boom;
2121
var runnable = require('middlewares/apis').runnable;
2222
var error = require('error');
23-
var createCount = require('callback-count');
2423
var pluck = require('101/pluck');
2524
var noop = require('101/noop');
2625

@@ -237,11 +236,8 @@ app.post('/builds/:id/actions/build',
237236
).catch(
238237
function (err, req, res, next) {
239238
error.log(err, req);
240-
var count = createCount(2, next);
241-
req.contextVersion.updateBuildError(err,
242-
logIfErrAndNext(count.next.bind(count)));
243239
req.build.modifyErrored(req.contextVersion._id,
244-
logIfErrAndNext(count.next.bind(count)));
240+
logIfErrAndNext(next));
245241
}
246242
)
247243
),

0 commit comments

Comments
 (0)