-
Notifications
You must be signed in to change notification settings - Fork 139
Add checks before accessing database #1119
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1119 +/- ##
==========================================
+ Coverage 74.62% 77.97% +3.35%
==========================================
Files 43 43
Lines 6734 6760 +26
==========================================
+ Hits 5025 5271 +246
+ Misses 1709 1489 -220 |
I will review it tomorrow. Btw, you could use a decorator to avoid having to write the same stuff many times. |
Thanks German. Don't hesitate to suggest changes in my code. I just want to add some checks before we try to access to the DB Client stub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I have created a decorator which you can attach to any method/property, and it will check if DB is alive in the DB object or element object.
@FredAns is this still a draft?? Or can we merge? |
Calling this good. Note: |
We need to check if the connection to a DB Server has been initiated before accessing it.