Use pdql.end with callback
This commit is contained in:
Generated
+3
-3
@@ -406,7 +406,7 @@
|
||||
}
|
||||
},
|
||||
"cartodb-psql": {
|
||||
"version": "github:cartodb/node-cartodb-psql#cd7328ce0ef77c3c17227b706f7862ff5b2951a3",
|
||||
"version": "github:cartodb/node-cartodb-psql#56744d4463a87f3a7f9209413a3f0efd127a4fea",
|
||||
"from": "github:cartodb/node-cartodb-psql#nodejs-10",
|
||||
"requires": {
|
||||
"debug": "^3.1.0",
|
||||
@@ -3871,7 +3871,7 @@
|
||||
"integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU="
|
||||
},
|
||||
"windshaft": {
|
||||
"version": "github:cartodb/windshaft#eeab518fd51871f6730d51c0b907e82d7eff3705",
|
||||
"version": "github:cartodb/windshaft#042d1f3986a70d8d9f530a37643efa92535a7163",
|
||||
"from": "github:cartodb/windshaft#nodejs-10",
|
||||
"requires": {
|
||||
"@carto/mapnik": "3.6.2-carto.11",
|
||||
@@ -3879,7 +3879,7 @@
|
||||
"abaculus": "github:cartodb/abaculus#4dc05ba2e91697ed5fc68734ffa3ffb46290c942",
|
||||
"canvas": "github:cartodb/node-canvas#232053066f3b0e711113d4a5af042a1a448199cd",
|
||||
"carto": "github:cartodb/carto#161516b7211d4be6bf401ab1957cb5cebc139f81",
|
||||
"cartodb-psql": "github:cartodb/node-cartodb-psql#cd7328ce0ef77c3c17227b706f7862ff5b2951a3",
|
||||
"cartodb-psql": "github:cartodb/node-cartodb-psql#56744d4463a87f3a7f9209413a3f0efd127a4fea",
|
||||
"debug": "3.1.0",
|
||||
"dot": "1.1.2",
|
||||
"grainstore": "github:cartodb/grainstore#e9828cc7f2777b7af61b7328269f32fdb5fb6b42",
|
||||
|
||||
@@ -1262,8 +1262,6 @@ TestClient.prototype.getDBConnection = function () {
|
||||
return psql;
|
||||
};
|
||||
|
||||
const pg = require('pg');
|
||||
|
||||
TestClient.prototype.setUserDatabaseTimeoutLimit = function (timeoutLimit, callback) {
|
||||
const dbname = _.template(global.environment.postgres_auth_user, { user_id: 1 }) + '_db';
|
||||
const dbuser = _.template(global.environment.postgres_auth_user, { user_id: 1 });
|
||||
@@ -1290,8 +1288,7 @@ TestClient.prototype.setUserDatabaseTimeoutLimit = function (timeoutLimit, callb
|
||||
},
|
||||
// we need to guarantee all new connections have the new settings
|
||||
function refreshPoolConnection () {
|
||||
pg.once('end', () => callback());
|
||||
pg.end();
|
||||
psql.end(() => callback());
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user