Don't kill program if can't connect to read server

This commit is contained in:
Ajay
2022-10-27 01:31:41 -04:00
parent 176f2ce7b9
commit c2acc6227b

View File

@@ -53,6 +53,7 @@ export class Postgres implements IDatabase {
});
if (this.config.postgresReadOnly && this.config.postgresReadOnly.enabled) {
try {
this.poolRead = new Pool({
...this.config.postgresReadOnly
});
@@ -66,6 +67,9 @@ export class Postgres implements IDatabase {
Logger.error(`poolRead (postgres): ${err}`);
}
});
} catch (e) {
Logger.error(`poolRead (postgres): ${e}`);
}
}
if (!this.config.readOnly) {