Skip to content

Commit

Permalink
Fixed: replace db.session.client.pool.end() with db.$client.pool.end()
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed Jan 21, 2025
1 parent a606cf3 commit 0c3dcc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions ving/docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ outline: deep
* Fixed a bug where undefined tables were added to the drizzle map due to yesterday's fix.
* Updated to latest drizzle and mysql2 modules.
* NOTE: Run `npm i` to update your modules.
* Fixed: replace db.session.client.pool.end() with db.$client.pool.end() #195

### 2025-01-20
* Fixed a problem where CLI would try to update the drizzle map when creating a new ving schema.
Expand Down
5 changes: 1 addition & 4 deletions ving/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { addJob } from '#ving/jobs/queue.mjs';
import { ouch } from '#ving/utils/ouch.mjs';
import { sleep } from '#ving/utils/sleep.mjs';
import { miniHash } from '#ving/utils/miniHash.mjs';
//import { useKind } from '#ving/record/utils.mjs'
import { useDB } from '#ving/drizzle/db.mjs'
import { useRedis } from '#ving/redis.mjs'
import { getConfig } from '#ving/config.mjs';
Expand All @@ -24,7 +23,6 @@ import { getConfig } from '#ving/config.mjs';
* addJob() - the same as `addJob` from '#ving/jobs/queue.mjs'
* ouch() - the same as `ouch` from '#ving/utils/ouch.mjs'
* getConfig() - the sames `getConfig` from '#ving/config.mjs'
* useKind() - the same as `useKind` from '#ving/record/VingRecord.mjs'
* close() - closes the connections mysql, redis/BullMQ, and redis/cache
*/
export default {
Expand All @@ -37,9 +35,8 @@ export default {
addJob,
ouch,
getConfig,
//useKind,
close: async () => {
await useDB().session.client.pool.end();
await useDB().$client.pool.end();
await useRedis().quit();
}
}

0 comments on commit 0c3dcc8

Please sign in to comment.