Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBS initialisation and timeouts #1017

Merged
merged 10 commits into from
Dec 4, 2023

Conversation

dbauszus-glx
Copy link
Member

The dbs object shouldn't be created on each require but only once when the process initiates with only the dbs object exported from the module.

The dbs should only be required without executing the exported method.

The statement_timeout does nothing on the pool. Setting the statement_timeout environment variable will set the statement prior to the query.

The statement_timeout doesn't have to be reset since the client is released after the query.

Only one pool should be created for the acl connection and stored outside the closure which returns the async query. The method should release the client after each query.

@dbauszus-glx dbauszus-glx added Bug A genuine bug. There must be some form of error exception to work with. Code Issues related to the code structure and performance. labels Nov 23, 2023
@dbauszus-glx dbauszus-glx marked this pull request as draft November 23, 2023 16:39
@dbauszus-glx dbauszus-glx linked an issue Nov 23, 2023 that may be closed by this pull request
@dbauszus-glx dbauszus-glx marked this pull request as ready for review November 23, 2023 16:56
Copy link

sonarqubecloud bot commented Dec 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@RobAndrewHurst RobAndrewHurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good to me!

@RobAndrewHurst RobAndrewHurst merged commit c3b5381 into GEOLYTIX:main Dec 4, 2023
6 checks passed
@dbauszus-glx dbauszus-glx deleted the pg-client-timeouts branch January 29, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A genuine bug. There must be some form of error exception to work with. Code Issues related to the code structure and performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

statement_timeout not working for new Pool in dbs mod
2 participants