mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Add database connection pool
This commit is contained in:
parent
4a29ccf97f
commit
e4aacd8dcb
@ -4,7 +4,7 @@ import TSClient from '../helpers/TSClient.js';
|
|||||||
|
|
||||||
const postgresUri = (await TSClient()).postgres_uri;
|
const postgresUri = (await TSClient()).postgres_uri;
|
||||||
export default class DatabaseServer {
|
export default class DatabaseServer {
|
||||||
public static seq:Sequelize = new Sequelize(postgresUri, {dialect: 'postgres', logging: false, ssl: false})
|
public static seq:Sequelize = new Sequelize(postgresUri, {dialect: 'postgres', logging: false, ssl: false, pool: {max: 10, min: 0, acquire: 15000, idle: 8000}})
|
||||||
public static async init() {
|
public static async init() {
|
||||||
try {
|
try {
|
||||||
await this.seq.authenticate();
|
await this.seq.authenticate();
|
||||||
|
Loading…
Reference in New Issue
Block a user