From 39eb0f7bec5bc745b8b34002174e3e0bee86d266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Tue, 31 Oct 2017 16:58:00 +0100 Subject: [PATCH] Avoid regression and update comment --- lib/cartodb/controllers/map.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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;