Skip to content

Commit 0c3dcc8

Browse files
committed
Fixed: replace db.session.client.pool.end() with db.$client.pool.end() #195
1 parent a606cf3 commit 0c3dcc8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

ving/docs/change-log.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ outline: deep
99
* Fixed a bug where undefined tables were added to the drizzle map due to yesterday's fix.
1010
* Updated to latest drizzle and mysql2 modules.
1111
* NOTE: Run `npm i` to update your modules.
12+
* Fixed: replace db.session.client.pool.end() with db.$client.pool.end() #195
1213

1314
### 2025-01-20
1415
* Fixed a problem where CLI would try to update the drizzle map when creating a new ving schema.

ving/index.mjs

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { addJob } from '#ving/jobs/queue.mjs';
55
import { ouch } from '#ving/utils/ouch.mjs';
66
import { sleep } from '#ving/utils/sleep.mjs';
77
import { miniHash } from '#ving/utils/miniHash.mjs';
8-
//import { useKind } from '#ving/record/utils.mjs'
98
import { useDB } from '#ving/drizzle/db.mjs'
109
import { useRedis } from '#ving/redis.mjs'
1110
import { getConfig } from '#ving/config.mjs';
@@ -24,7 +23,6 @@ import { getConfig } from '#ving/config.mjs';
2423
* addJob() - the same as `addJob` from '#ving/jobs/queue.mjs'
2524
* ouch() - the same as `ouch` from '#ving/utils/ouch.mjs'
2625
* getConfig() - the sames `getConfig` from '#ving/config.mjs'
27-
* useKind() - the same as `useKind` from '#ving/record/VingRecord.mjs'
2826
* close() - closes the connections mysql, redis/BullMQ, and redis/cache
2927
*/
3028
export default {
@@ -37,9 +35,8 @@ export default {
3735
addJob,
3836
ouch,
3937
getConfig,
40-
//useKind,
4138
close: async () => {
42-
await useDB().session.client.pool.end();
39+
await useDB().$client.pool.end();
4340
await useRedis().quit();
4441
}
4542
}

0 commit comments

Comments
 (0)