From aa36236ed2994244c1287ef068d0556810f97da6 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Thu, 14 Apr 2016 13:25:56 +0200 Subject: [PATCH] Rename analysis to analysis status backend, making room for analysis backend --- lib/cartodb/backends/{analysis.js => analysis-status.js} | 6 +++--- lib/cartodb/controllers/layergroup.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename lib/cartodb/backends/{analysis.js => analysis-status.js} (87%) diff --git a/lib/cartodb/backends/analysis.js b/lib/cartodb/backends/analysis-status.js similarity index 87% rename from lib/cartodb/backends/analysis.js rename to lib/cartodb/backends/analysis-status.js index 67a80ed3..8ba7ae9d 100644 --- a/lib/cartodb/backends/analysis.js +++ b/lib/cartodb/backends/analysis-status.js @@ -1,12 +1,12 @@ var PSQL = require('cartodb-psql'); -function AnalysisBackend() { +function AnalysisStatusBackend() { } -module.exports = AnalysisBackend; +module.exports = AnalysisStatusBackend; -AnalysisBackend.prototype.getNodeStatus = function (params, callback) { +AnalysisStatusBackend.prototype.getNodeStatus = function (params, callback) { var nodeId = params.nodeId; var statusQuery = 'SELECT node_id, status, updated_at FROM cdb_analysis_catalog where node_id = \'' + nodeId + '\''; diff --git a/lib/cartodb/controllers/layergroup.js b/lib/cartodb/controllers/layergroup.js index 915ff839..642e2a09 100644 --- a/lib/cartodb/controllers/layergroup.js +++ b/lib/cartodb/controllers/layergroup.js @@ -8,7 +8,7 @@ var cors = require('../middleware/cors'); var userMiddleware = require('../middleware/user'); var DataviewBackend = require('../backends/dataview'); -var AnalysisBackend = require('../backends/analysis'); +var AnalysisStatusBackend = require('../backends/analysis-status'); var MapStoreMapConfigProvider = require('../models/mapconfig/map_store_provider'); @@ -42,7 +42,7 @@ function LayergroupController(authApi, pgConnection, mapStore, tileBackend, prev this.layergroupAffectedTables = layergroupAffectedTables; this.dataviewBackend = new DataviewBackend(); - this.analysisBackend = new AnalysisBackend(); + this.analysisStatusBackend = new AnalysisStatusBackend(); } util.inherits(LayergroupController, BaseController); @@ -107,7 +107,7 @@ LayergroupController.prototype.analysisNodeStatus = function(req, res) { }, function retrieveNodeStatus(err) { assert.ifError(err); - self.analysisBackend.getNodeStatus(req.params, this); + self.analysisStatusBackend.getNodeStatus(req.params, this); }, function finish(err, nodeStatus, stats) { req.profiler.add(stats || {});