Merge branch 'master' into standalone-server

Conflicts:
	lib/cartodb/cartodb_windshaft.js
This commit is contained in:
Raul Ochoa 2015-09-08 15:42:30 +02:00
commit f96c80d7a1
10 changed files with 69 additions and 16 deletions

View File

@ -162,6 +162,16 @@ var config = {
type: 'fs', // 'fs' and 'url' supported type: 'fs', // 'fs' and 'url' supported
src: __dirname + '/../../assets/default-placeholder.png' src: __dirname + '/../../assets/default-placeholder.png'
} }
},
torque: {
dbPoolParams: {
// maximum number of resources to create at any given time
size: 16,
// max milliseconds a resource can go unused before it should be destroyed
idleTimeout: 3000,
// frequency to check for idle resources
reapInterval: 1000
}
} }
} }
,millstone: { ,millstone: {

View File

@ -156,6 +156,16 @@ var config = {
type: 'fs', // 'fs' and 'url' supported type: 'fs', // 'fs' and 'url' supported
src: __dirname + '/../../assets/default-placeholder.png' src: __dirname + '/../../assets/default-placeholder.png'
} }
},
torque: {
dbPoolParams: {
// maximum number of resources to create at any given time
size: 16,
// max milliseconds a resource can go unused before it should be destroyed
idleTimeout: 3000,
// frequency to check for idle resources
reapInterval: 1000
}
} }
} }
,millstone: { ,millstone: {

View File

@ -156,6 +156,16 @@ var config = {
type: 'fs', // 'fs' and 'url' supported type: 'fs', // 'fs' and 'url' supported
src: __dirname + '/../../assets/default-placeholder.png' src: __dirname + '/../../assets/default-placeholder.png'
} }
},
torque: {
dbPoolParams: {
// maximum number of resources to create at any given time
size: 16,
// max milliseconds a resource can go unused before it should be destroyed
idleTimeout: 3000,
// frequency to check for idle resources
reapInterval: 1000
}
} }
} }
,millstone: { ,millstone: {

View File

@ -158,6 +158,16 @@ var config = {
type: 'fs', // 'fs' and 'url' supported type: 'fs', // 'fs' and 'url' supported
src: __dirname + '/../../assets/default-placeholder.png' src: __dirname + '/../../assets/default-placeholder.png'
} }
},
torque: {
dbPoolParams: {
// maximum number of resources to create at any given time
size: 16,
// max milliseconds a resource can go unused before it should be destroyed
idleTimeout: 3000,
// frequency to check for idle resources
reapInterval: 1000
}
} }
} }
,millstone: { ,millstone: {

View File

@ -37,7 +37,7 @@ ServerInfoController.prototype.version = function(req, res) {
ServerInfoController.prototype.health = function(req, res) { ServerInfoController.prototype.health = function(req, res) {
if (!!this.healthConfig.enabled) { if (!!this.healthConfig.enabled) {
var startTime = Date.now(); var startTime = Date.now();
this.healthCheck.check(this.healthConfig, function(err) { this.healthCheck.check(function(err) {
var ok = !err; var ok = !err;
var response = { var response = {
enabled: true, enabled: true,

View File

@ -8,7 +8,7 @@ function HealthCheck(disableFile) {
module.exports = HealthCheck; module.exports = HealthCheck;
HealthCheck.prototype.check = function(config, callback) { HealthCheck.prototype.check = function(callback) {
var self = this; var self = this;

View File

@ -62,6 +62,7 @@ module.exports = {
}, },
renderer: { renderer: {
mapnik: rendererConfig.mapnik, mapnik: rendererConfig.mapnik,
torque: rendererConfig.torque,
http: rendererConfig.http http: rendererConfig.http
}, },
// Do not send unwatch on release. See http://github.com/CartoDB/Windshaft-cartodb/issues/161 // Do not send unwatch on release. See http://github.com/CartoDB/Windshaft-cartodb/issues/161

34
npm-shrinkwrap.json generated
View File

@ -191,14 +191,14 @@
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz"
}, },
"mime-types": { "mime-types": {
"version": "2.1.5", "version": "2.1.6",
"from": "mime-types@~2.1.2", "from": "mime-types@~2.1.2",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.5.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.6.tgz",
"dependencies": { "dependencies": {
"mime-db": { "mime-db": {
"version": "1.17.0", "version": "1.18.0",
"from": "mime-db@~1.17.0", "from": "mime-db@~1.18.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.17.0.tgz" "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.18.0.tgz"
} }
} }
}, },
@ -372,9 +372,9 @@
} }
}, },
"is-my-json-valid": { "is-my-json-valid": {
"version": "2.12.1", "version": "2.12.2",
"from": "is-my-json-valid@^2.12.0", "from": "is-my-json-valid@^2.12.0",
"resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.1.tgz", "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.12.2.tgz",
"dependencies": { "dependencies": {
"generate-function": { "generate-function": {
"version": "2.0.0", "version": "2.0.0",
@ -394,9 +394,9 @@
} }
}, },
"jsonpointer": { "jsonpointer": {
"version": "1.1.0", "version": "2.0.0",
"from": "jsonpointer@^1.1.0", "from": "jsonpointer@2.0.0",
"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-1.1.0.tgz" "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-2.0.0.tgz"
}, },
"xtend": { "xtend": {
"version": "4.0.0", "version": "4.0.0",
@ -524,7 +524,7 @@
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz" "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz"
}, },
"windshaft": { "windshaft": {
"version": "0.51.1", "version": "0.52.0",
"from": "https://github.com/CartoDB/Windshaft/tarball/backend-foundations", "from": "https://github.com/CartoDB/Windshaft/tarball/backend-foundations",
"resolved": "https://github.com/CartoDB/Windshaft/tarball/backend-foundations", "resolved": "https://github.com/CartoDB/Windshaft/tarball/backend-foundations",
"dependencies": { "dependencies": {
@ -2287,6 +2287,18 @@
} }
} }
}, },
"debug": {
"version": "2.2.0",
"from": "debug@~2.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
"dependencies": {
"ms": {
"version": "0.7.1",
"from": "ms@0.7.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
}
}
},
"tilelive": { "tilelive": {
"version": "4.5.3", "version": "4.5.3",
"from": "tilelive@~4.5.3", "from": "tilelive@~4.5.3",

View File

@ -60,7 +60,7 @@ describe('health checks', function () {
callback(null, "Maintenance"); callback(null, "Maintenance");
}; };
healthCheck.check(null, function(err/*, result*/) { healthCheck.check(function(err) {
assert.equal(err.message, "Maintenance"); assert.equal(err.message, "Maintenance");
assert.equal(err.http_status, 503); assert.equal(err.http_status, 503);
done(); done();

View File

@ -41,11 +41,11 @@ BEGIN
xpath('//x:Relation-Name/text()', exp, ARRAY[ARRAY['x', 'http://www.postgresql.org/2009/explain']]) as x, xpath('//x:Relation-Name/text()', exp, ARRAY[ARRAY['x', 'http://www.postgresql.org/2009/explain']]) as x,
xpath('//x:Relation-Name/../x:Schema/text()', exp, ARRAY[ARRAY['x', 'http://www.postgresql.org/2009/explain']]) as s xpath('//x:Relation-Name/../x:Schema/text()', exp, ARRAY[ARRAY['x', 'http://www.postgresql.org/2009/explain']]) as s
) )
SELECT unnest(x) as p, unnest(s) as sc from inp SELECT unnest(x)::text as p, unnest(s)::text as sc from inp
LOOP LOOP
-- RAISE DEBUG 'tab: %', rec2.p; -- RAISE DEBUG 'tab: %', rec2.p;
-- RAISE DEBUG 'sc: %', rec2.sc; -- RAISE DEBUG 'sc: %', rec2.sc;
tables := array_append(tables, (rec2.sc || '.' || rec2.p)); tables := array_append(tables, format('%s.%s', quote_ident(rec2.sc), quote_ident(rec2.p)));
END LOOP; END LOOP;
-- RAISE DEBUG 'Tables: %', tables; -- RAISE DEBUG 'Tables: %', tables;