diff --git a/NEWS.md b/NEWS.md index ce7e7d92..9a9f27c4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,12 @@ Released 2015-mm-dd +Bug fixes: + - Do not check statsd_client in profiler + +Announcements: + - Upgrades windshaft to [0.42.1](https://github.com/CartoDB/Windshaft/releases/tag/0.42.1) + ## 2.1.1 diff --git a/lib/cartodb/controllers/template_maps.js b/lib/cartodb/controllers/template_maps.js index bfc00f33..be2022a8 100644 --- a/lib/cartodb/controllers/template_maps.js +++ b/lib/cartodb/controllers/template_maps.js @@ -59,9 +59,6 @@ TemplateMapsController.prototype.create = function(req, res) { return { template_id: cdbuser + '@' + tpl_id }; }, function finish(err, response){ - if ( req.profiler ) { - res.header('X-Tiler-Profiler', req.profiler.toJSONString()); - } if (err){ response = { error: ''+err }; var statusCode = 400; @@ -115,9 +112,6 @@ TemplateMapsController.prototype.update = function(req, res) { return { template_id: cdbuser + '@' + tpl_id }; }, function finish(err, response){ - if ( req.profiler ) { - res.header('X-Tiler-Profiler', req.profiler.toJSONString()); - } if (err){ var statusCode = 400; response = { error: ''+err }; @@ -136,7 +130,7 @@ TemplateMapsController.prototype.update = function(req, res) { TemplateMapsController.prototype.retrieve = function(req, res) { var self = this; - if ( req.profiler && req.profiler.statsd_client ) { + if (req.profiler) { req.profiler.start('windshaft-cartodb.get_template'); } @@ -198,7 +192,7 @@ TemplateMapsController.prototype.retrieve = function(req, res) { TemplateMapsController.prototype.destroy = function(req, res) { var self = this; - if ( req.profiler && req.profiler.statsd_client ) { + if (req.profiler) { req.profiler.start('windshaft-cartodb.delete_template'); } this.app.doCORS(res); @@ -250,8 +244,7 @@ TemplateMapsController.prototype.destroy = function(req, res) { // Get a list of owned templates TemplateMapsController.prototype.list = function(req, res) { var self = this; - - if ( req.profiler && req.profiler.statsd_client ) { + if ( req.profiler ) { req.profiler.start('windshaft-cartodb.get_template_list'); } this.app.doCORS(res); @@ -295,7 +288,7 @@ TemplateMapsController.prototype.list = function(req, res) { TemplateMapsController.prototype.instantiate = function(req, res) { var self = this; - if ( req.profiler && req.profiler.statsd_client) { + if (req.profiler) { req.profiler.start('windshaft-cartodb.instance_template_post'); } step( @@ -305,7 +298,7 @@ TemplateMapsController.prototype.instantiate = function(req, res) { } self.instantiateTemplate(req, res, req.body, this); }, function(err, response) { - self.finish_instantiation(err, response, res, req); + self.finish_instantiation(err, response, res); } ); }; @@ -322,7 +315,7 @@ TemplateMapsController.prototype.options = function(req, res, next) { TemplateMapsController.prototype.jsonp = function(req, res) { var self = this; - if ( req.profiler && req.profiler.statsd_client) { + if (req.profiler) { req.profiler.start('windshaft-cartodb.instance_template_get'); } step( @@ -340,7 +333,7 @@ TemplateMapsController.prototype.jsonp = function(req, res) { } self.instantiateTemplate(req, res, config, this); }, function(err, response) { - self.finish_instantiation(err, response, res, req); + self.finish_instantiation(err, response, res); } ); }; @@ -447,19 +440,13 @@ TemplateMapsController.prototype.instantiateTemplate = function(req, res, templa ); }; -TemplateMapsController.prototype.finish_instantiation = function(err, response, res, req) { - if ( req.profiler ) { - res.header('X-Tiler-Profiler', req.profiler.toJSONString()); - } +TemplateMapsController.prototype.finish_instantiation = function(err, response, res) { if (err) { var statusCode = 400; response = { error: ''+err }; if ( ! _.isUndefined(err.http_status) ) { statusCode = err.http_status; } - if(global.environment.debug) { - response.stack = err.stack; - } this.app.sendError(res, response, statusCode, 'POST INSTANCE TEMPLATE', err); } else { this.app.sendResponse(res, [response, 200]); diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 68fa6777..28bcd6ab 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -170,9 +170,9 @@ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz" }, "windshaft": { - "version": "0.42.0", - "from": "windshaft@0.42.0", - "resolved": "https://registry.npmjs.org/windshaft/-/windshaft-0.42.0.tgz", + "version": "0.42.1", + "from": "windshaft@0.42.1", + "resolved": "https://registry.npmjs.org/windshaft/-/windshaft-0.42.1.tgz", "dependencies": { "chronograph": { "version": "0.1.0", diff --git a/package.json b/package.json index c580f69e..1aa4fe19 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "dependencies": { "underscore" : "~1.6.0", "dot": "~1.0.2", - "windshaft": "0.42.0", + "windshaft": "0.42.1", "step": "~0.0.5", "queue-async": "~1.0.7", "request": "~2.9.203",