Skip to content

Commit 9005403

Browse files
committed
Remove cds.requires.db.pool for now
1 parent 31642de commit 9005403

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

hana/lib/HANAService.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,18 @@ class HANAService extends SQLService {
4545
}
4646
const isMultitenant = !!service.options.credentials.sm_url || ('multiTenant' in this.options ? this.options.multiTenant : cds.env.requires.multitenancy)
4747
const acquireTimeoutMillis = this.options.pool?.acquireTimeoutMillis || (cds.env.profiles.includes('production') ? 1000 : 10000)
48-
const options = cds.requires.db.pool = {
49-
min: 0,
50-
max: 10,
51-
acquireTimeoutMillis,
52-
idleTimeoutMillis: 60000,
53-
evictionRunIntervalMillis: 100000,
54-
numTestsPerEvictionRun: Math.ceil((this.options.pool?.max || 10) - (this.options.pool?.min || 0) / 3),
55-
...(this.options.pool || {}),
56-
testOnBorrow: true,
57-
fifo: false
58-
}
5948
return {
60-
options,
49+
options: {
50+
min: 0,
51+
max: 10,
52+
acquireTimeoutMillis,
53+
idleTimeoutMillis: 60000,
54+
evictionRunIntervalMillis: 100000,
55+
numTestsPerEvictionRun: Math.ceil((this.options.pool?.max || 10) - (this.options.pool?.min || 0) / 3),
56+
...(this.options.pool || {}),
57+
testOnBorrow: true,
58+
fifo: false
59+
},
6160
create: async function (tenant) {
6261
try {
6362
const { credentials } = isMultitenant

0 commit comments

Comments
 (0)