mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 16:30:58 -05:00
Add database connection pool
This commit is contained in:
parent
d8414e528a
commit
b553c5b8b3
@ -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