From d9f6df98150840f4d995a8e24239d4b6c5b0466e Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Thu, 3 Mar 2016 19:01:58 +0100 Subject: [PATCH] Remove nested step call --- lib/cartodb/controllers/map.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/lib/cartodb/controllers/map.js b/lib/cartodb/controllers/map.js index e4f5db46..ff164e9c 100644 --- a/lib/cartodb/controllers/map.js +++ b/lib/cartodb/controllers/map.js @@ -315,21 +315,12 @@ MapController.prototype.afterLayergroupCreate = function(req, res, mapconfig, la var layergroupId = layergroup.layergroupid; step( - function checkCachedAffectedTables() { - return self.layergroupAffectedTables.hasAffectedTables(dbName, layergroupId); + function getPgConnection() { + self.pgConnection.getConnection(username, this); }, - function getAffectedTablesAndLastUpdatedTime(err) { + function getAffectedTablesAndLastUpdatedTime(err, connection) { assert.ifError(err); - step( - function getConnection() { - self.pgConnection.getConnection(username, this); - }, - function getAffectedTables(err, connection) { - assert.ifError(err); - QueryTables.getAffectedTablesFromQuery(connection, sql, this); - }, - this - ); + QueryTables.getAffectedTablesFromQuery(connection, sql, this); }, function handleAffectedTablesAndLastUpdatedTime(err, result) { if (req.profiler) {