diff --git a/lib/util/sequelize.js b/lib/util/sequelize.js index b65eb6e8..f3946e92 100644 --- a/lib/util/sequelize.js +++ b/lib/util/sequelize.js @@ -4,13 +4,20 @@ const {POSTGRES_BAN_USER, POSTGRES_BAN_PASSWORD, POSTGRES_DB, POSTGRES_URL} = pr const POSTGRES_PORT = process.env.POSTGRES_PORT || 5432 // Create a new Sequelize instance +/* eslint-disable unicorn/numeric-separators-style */ export const sequelize = new Sequelize(POSTGRES_DB, POSTGRES_BAN_USER, POSTGRES_BAN_PASSWORD, { host: POSTGRES_URL, port: POSTGRES_PORT, dialect: 'postgres', - logging: false + logging: false, + pool: { + max: 20, + min: 0, + acquire: 60000, + idle: 5000 + } }) - +/* eslint-enable unicorn/numeric-separators-style */ export const District = sequelize.define('District', { id: { type: DataTypes.UUID,