Merge branch 'release/staging' into develop
This commit is contained in:
commit
80452ef6f4
3
NEWS.md
3
NEWS.md
@ -5,6 +5,9 @@
|
||||
1.4.0
|
||||
-----
|
||||
* Add arraybuffer format
|
||||
* Fix filesystem access conflict among clustered processes
|
||||
* Fix discard of queued export requests on error
|
||||
* Really fix problem identifying OAuth requests
|
||||
|
||||
1.3.10
|
||||
------
|
||||
|
4
app.js
4
app.js
@ -13,9 +13,9 @@ var _ = require('underscore');
|
||||
|
||||
// sanity check arguments
|
||||
var ENV = process.argv[2];
|
||||
if (ENV != 'development' && ENV != 'production' && ENV != 'test') {
|
||||
if (ENV != 'development' && ENV != 'production' && ENV != 'test' && ENV != 'staging' ) {
|
||||
console.error("\n./app [environment]");
|
||||
console.error("environments: [development, test, production]");
|
||||
console.error("environments: [development, staging, production, test]");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ console.log(['ogr2ogr',
|
||||
ogr.prototype.toOGR_SingleFile = function(dbname, user_id, gcol, sql, skipfields, fmt, ext, callback) {
|
||||
var tmpdir = global.settings.tmpDir || '/tmp';
|
||||
var reqKey = [ fmt, dbname, user_id, gcol, this.generateMD5(sql) ].concat(skipfields).join(':');
|
||||
var outdirpath = tmpdir + '/sqlapi-' + reqKey;
|
||||
var outdirpath = tmpdir + '/sqlapi-' + process.pid + '-' + reqKey;
|
||||
var dumpfile = outdirpath + ':cartodb-query.' + ext;
|
||||
|
||||
// TODO: following tests:
|
||||
@ -178,12 +178,8 @@ ogr.prototype.sendResponse = function(opts, callback) {
|
||||
} else {
|
||||
baking = bakingExports[reqKey] = { req: [ qElem ] };
|
||||
this.generate(opts, function(err, dumpfile) {
|
||||
if(err) {
|
||||
next(err);
|
||||
return;
|
||||
}
|
||||
Step (
|
||||
function sendResults(err) {
|
||||
function sendResults() {
|
||||
var nextPipe = function(finish) {
|
||||
var r = baking.req.shift();
|
||||
if ( ! r ) { finish(null); return; }
|
||||
|
@ -25,7 +25,7 @@ p.toSHP = function (dbname, user_id, gcol, sql, skipfields, filename, callback)
|
||||
var zip = 'zip'; // FIXME: make configurable
|
||||
var tmpdir = global.settings.tmpDir || '/tmp';
|
||||
var reqKey = [ 'shp', dbname, user_id, gcol, this.generateMD5(sql) ].concat(skipfields).join(':');
|
||||
var outdirpath = tmpdir + '/sqlapi-' + reqKey;
|
||||
var outdirpath = tmpdir + '/sqlapi-' + process.pid + '-' + reqKey;
|
||||
var zipfile = outdirpath + '.zip';
|
||||
var shapefile = outdirpath + '/' + filename + '.shp';
|
||||
|
||||
@ -87,11 +87,14 @@ p.toSHP = function (dbname, user_id, gcol, sql, skipfields, filename, callback)
|
||||
unlinkall(outdirpath, files, function(err) {
|
||||
fs.rmdir(outdirpath, function(err) {
|
||||
if ( err ) console.log("Removing dir " + path + ": " + err);
|
||||
callback(topError, zipfile);
|
||||
next(topError, zipfile);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
function finalStep(err, zipfile) {
|
||||
callback(err, zipfile);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
@ -108,7 +108,7 @@ var oAuth = function(){
|
||||
return;
|
||||
}
|
||||
|
||||
var path = httpProto + '://' + host + req.route.path;
|
||||
var path = httpProto + '://' + host + req.path;
|
||||
that.splitParams(req.query);
|
||||
|
||||
// remove signature from passed_tokens
|
||||
|
Loading…
Reference in New Issue
Block a user