Skip to content

Commit 7c2ac5d

Browse files
vitaly-tArul-
authored andcommitted
Update PostgresClient.js (parse-community#7276)
Proper pg-monitor re-attachment logic.
1 parent 64df61c commit 7c2ac5d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
],
2020
"license": "BSD-3-Clause",
2121
"dependencies": {
22-
"@apollographql/graphql-playground-html": "1.6.26",
22+
"@apollographql/graphql-playground-html": "1.6.27",
2323
"@graphql-tools/links": "6.2.5",
2424
"@graphql-tools/stitch": "6.2.4",
2525
"@graphql-tools/utils": "6.2.4",
@@ -43,7 +43,7 @@
4343
"intersect": "1.0.1",
4444
"jsonwebtoken": "8.5.1",
4545
"jwks-rsa": "1.12.2",
46-
"ldapjs": "2.2.3",
46+
"ldapjs": "2.2.4",
4747
"lodash": "4.17.21",
4848
"lru-cache": "5.1.1",
4949
"mime": "2.5.2",

src/Adapters/Storage/Postgres/PostgresClient.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export function createClient(uri, databaseOptions) {
2020

2121
if (process.env.PARSE_SERVER_LOG_LEVEL === 'debug') {
2222
const monitor = require('pg-monitor');
23+
if(monitor.isAttached()) {
24+
monitor.detach();
25+
}
2326
monitor.attach(initOptions);
2427
}
2528

0 commit comments

Comments
 (0)