Skip to content

Commit

Permalink
Merge pull request #184 from Sanketika-Obsrv/#234api-integration
Browse files Browse the repository at this point in the history
Sanketika-Obsrv/issue-tracker#234: adding max connection pool to sequ…
  • Loading branch information
HarishGangula authored Jun 10, 2024
2 parents 52605e8 + e6c250e commit fa8cb39
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api-service/src/v2/connections/databaseConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import { connectionConfig } from "../configs/ConnectionsConfig"
const { database, host, password, port, username } = connectionConfig.postgres

export const sequelize = new Sequelize({
database, password, username: username, dialect: "postgres", host, port: +port
database, password, username: username, dialect: "postgres", host, port: +port, pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
}
})

export const query = async (query: string) => {
Expand Down

0 comments on commit fa8cb39

Please sign in to comment.