feat: Add connection pool connection check parameters#3905
Conversation
| 'PRE_PING': True | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
The provided code looks mostly correct and does not contain any major issues. However, I would suggest a few minor optimizations and changes:
-
Consistency in Key Capitalization: Ensure that all dictionary keys use consistent capitalization (or lowercase), such as
pool_size,max_overflow, etc. -
Comments: Consider adding comments to explain each key-value pair for clarity. This is just a suggestion and doesn't affect the functionality of the function.
Here's the modified version with these suggestions:
@@ -118,7 +118,8 @@ def get_db_setting(self) -> dict:
"POOL_SIZE": 20,
"MAX_OVERFLOW": int(self.get('DB_MAX_OVERFLOW')),
"RECYCLE": 1800,
- "TIMEOUT": 30
+ "TIMEOUT": 30,
+ 'PRE_PING': True
}
}If you need further assistance or have more specific changes in mind, feel free to ask!
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
feat: Add connection pool connection check parameters