Skip to content

Commit

Permalink
try the thing
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksclark committed Feb 21, 2024
1 parent 505467b commit b8836e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dialects/abstract/connection-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,13 @@ class ConnectionManager {
}
},
acquire: (queryType, useMaster) => {
debug(`acquire called ${queryType} - ${useMaster}`);
useMaster = useMaster === undefined ? false : useMaster;
if (queryType === 'SELECT' && !useMaster) {
debug('returning read pool');
return this.pool.read.acquire();
}
debug('returning write pool');
return this.pool.write.acquire();
},
destroy: connection => {
Expand Down

0 comments on commit b8836e2

Please sign in to comment.