From 763134437b64d316f8c6aa75d541f1cf46158122 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Fri, 20 Jul 2018 10:22:54 +0200 Subject: [PATCH] Use the db_batch_port for copy --- app/services/stream_copy.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/services/stream_copy.js b/app/services/stream_copy.js index e46abe58..60dbf95e 100644 --- a/app/services/stream_copy.js +++ b/app/services/stream_copy.js @@ -8,7 +8,10 @@ const ACTION_FROM = 'from'; module.exports = class StreamCopy { constructor(sql, userDbParams) { - this.pg = new PSQL(userDbParams); + const dbParams = Object.assign({}, userDbParams, { + port: global.settings.db_batch_port || userDbParams.port + }); + this.pg = new PSQL(dbParams); this.sql = sql; this.stream = null; }