diff --git a/lib/cartodb/controllers/map.js b/lib/cartodb/controllers/map.js index 80f99d8e..05363a06 100644 --- a/lib/cartodb/controllers/map.js +++ b/lib/cartodb/controllers/map.js @@ -332,16 +332,15 @@ MapController.prototype.afterLayergroupCreate = function (req, res, callback) { } }; - // Don't wait for the mapview count increment to - // take place before proceeding. Error will be logged - // asynchronously + // Perform mapview count increment in parallel along the rest of after-layergroup-create + // tasks. Error won't blow up, just logged. this.metadataBackend.incMapviewCount(user, mapconfig.obj().stat_tag, function(err) { req.profiler.done('incMapviewCount'); if ( err ) { global.logger.log("ERROR: failed to increment mapview count for user '" + user + "': " + err); } - done(err); + done(); }); step( @@ -383,7 +382,7 @@ MapController.prototype.augmentLayergroupData = function (req, res, callback) { _.extend(layergroup, global.environment.serverMetadata); callback(); -} +}; MapController.prototype.getAffectedTables = function (req, res, callback) { const self = this;