不要怂,就是干,撸起袖子干!

Commit 555dbe1f by wata-lb Committed by Sushant

fix(types): add PoolOptions.evict (#11378) (#11379)

1 parent d776d7a5
...@@ -97,6 +97,11 @@ export interface PoolOptions { ...@@ -97,6 +97,11 @@ export interface PoolOptions {
acquire?: number; acquire?: number;
/** /**
* The time interval, in milliseconds, after which sequelize-pool will remove idle connections.
*/
evict?: number;
/**
* A function that validates a connection. Called with client. The default function checks that client is an * A function that validates a connection. Called with client. The default function checks that client is an
* object, and that its state is not disconnected * object, and that its state is not disconnected
*/ */
......
...@@ -15,6 +15,9 @@ export const sequelize = new Sequelize({ ...@@ -15,6 +15,9 @@ export const sequelize = new Sequelize({
match: ['hurr'], match: ['hurr'],
}, },
dialectModule: {}, dialectModule: {},
pool: {
evict: 1000,
}
}); });
const conn = sequelize.connectionManager; const conn = sequelize.connectionManager;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!