mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-27 04:15:38 -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;
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user