1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 12:21:00 -05:00

Add database connection pool

This commit is contained in:
AnxietyisReal 2023-12-31 03:04:19 +11:00
parent d8414e528a
commit b553c5b8b3

View File

@ -4,7 +4,7 @@ import TSClient from '../helpers/TSClient.js';
const postgresUri = (await TSClient()).postgres_uri;
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() {
try {
await this.seq.authenticate();