From 4c0c296dc6a03a803fec327abb915d74fc2fddd2 Mon Sep 17 00:00:00 2001 From: Mikhail Chechnev Date: Tue, 10 Dec 2024 13:24:46 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A6=D0=98=D0=A2=D0=9A-937=20-=20=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=D0=B7=20=D0=BE=D1=82=20=D0=B8=D0=BD=D0=B4=D0=B8?= =?UTF-8?q?=D0=B2=D0=B8=D0=B4=D1=83=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BA=20PG=20=D0=B2=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D1=83=20=D0=B5=D0=B4=D0=B8=D0=BD=D0=BE=D0=B3=D0=BE=20sConnectS?= =?UTF-8?q?tring?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.js | 8 +------- config_default.js | 8 +------- modules/parus_pg_db.js | 6 +----- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/config.js b/config.js index 8f535e5..086b780 100644 --- a/config.js +++ b/config.js @@ -27,14 +27,8 @@ let dbConnect = { sPassword: "exs", //Схема размещения используемых объектов БД sSchema: "PARUS", - //Строка подключения к БД Oracle + //Строка подключения к БД sConnectString: "DEMOP_CITKSERV_WAN", - //Адрес сервера PG - sPGHost: "", - //Порт сервера PG - sPGPort: "", - //База данных PG - sPGDatabase: "", //Наименование сервера приложений в сессии БД sSessionAppName: "PARUS$ExchangeServer", //Подключаемый модуль обслуживания БД (низкоуровневые функции работы с СУБД) diff --git a/config_default.js b/config_default.js index 438ae27..e4ec43c 100644 --- a/config_default.js +++ b/config_default.js @@ -27,14 +27,8 @@ let dbConnect = { sPassword: "exs", //Схема размещения используемых объектов БД sSchema: "PARUS", - //Строка подключения к БД Oracle + //Строка подключения к БД sConnectString: "", - //Адрес сервера PG - sPGHost: "", - //Порт сервера PG - sPGPort: "", - //База данных PG - sPGDatabase: "", //Наименование сервера приложений в сессии БД sSessionAppName: "PARUS$ExchangeServer", //Подключаемый модуль обслуживания БД (низкоуровневые функции работы с СУБД) diff --git a/modules/parus_pg_db.js b/modules/parus_pg_db.js index 636946b..401fae4 100644 --- a/modules/parus_pg_db.js +++ b/modules/parus_pg_db.js @@ -169,11 +169,7 @@ const checkRelease = async prms => { const connect = async prms => { try { let pool = new pg.Pool({ - user: prms.sUser, - password: prms.sPassword, - host: prms.sPGHost, - port: prms.sPGPort, - database: prms.sPGDatabase, + connectionString: `postgres://${prms.sUser}:${prms.sPassword}@${prms.sConnectString}`, connectionTimeoutMillis: 600000, min: prms.nPoolMin ? prms.nPoolMin : 4, max: prms.nPoolMax ? prms.nPoolMax : 4