Update app and tooling
This commit is contained in:
parent
3046531bdd
commit
e620ec7349
4950 changed files with 2975120 additions and 10 deletions
22
node_modules/generic-pool/lib/DefaultEvictor.js
generated
vendored
Normal file
22
node_modules/generic-pool/lib/DefaultEvictor.js
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"use strict";
|
||||
|
||||
class DefaultEvictor {
|
||||
evict(config, pooledResource, availableObjectsCount) {
|
||||
const idleTime = Date.now() - pooledResource.lastIdleTime;
|
||||
|
||||
if (
|
||||
config.softIdleTimeoutMillis < idleTime &&
|
||||
config.min < availableObjectsCount
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (config.idleTimeoutMillis < idleTime) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DefaultEvictor;
|
||||
Loading…
Add table
Add a link
Reference in a new issue