Postgres: Properly initialize database on startup and debugger (#7255)
* PG: Properly initialize database * fix flaky tests * flaky test * correct test * no idea * clean up debugger
This commit is contained in:
@@ -18,6 +18,11 @@ export function createClient(uri, databaseOptions) {
|
||||
const pgp = require('pg-promise')(initOptions);
|
||||
const client = pgp(dbOptions);
|
||||
|
||||
if (process.env.PARSE_SERVER_LOG_LEVEL === 'debug') {
|
||||
const monitor = require('pg-monitor');
|
||||
monitor.attach(initOptions);
|
||||
}
|
||||
|
||||
if (dbOptions.pgOptions) {
|
||||
for (const key in dbOptions.pgOptions) {
|
||||
pgp.pg.defaults[key] = dbOptions.pgOptions[key];
|
||||
|
||||
Reference in New Issue
Block a user