-
Notifications
You must be signed in to change notification settings - Fork 429
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
fix: prevent tasks dying from temporary loss of db connection #3674
fix: prevent tasks dying from temporary loss of db connection #3674
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3674 +/- ##
==========================================
+ Coverage 95.86% 95.90% +0.03%
==========================================
Files 1099 1100 +1
Lines 34422 34458 +36
==========================================
+ Hits 33000 33047 +47
+ Misses 1422 1411 -11 ☔ View full report in Codecov by Sentry. |
api/tests/unit/environments/dynamodb/wrappers/test_unit_dynamodb_environment_v2_wrapper.py
Outdated
Show resolved
Hide resolved
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'd love to see a test with less mocking (e.g. with db fixture taken out), but it's probably not worth the hassle. In case of errors different than DatabaseError
, we'll take it as it comes I guess.
Changes
Fixes issue where threads die from a temporary loss of connection to the database by catching DatabaseError and logging.
How did you test this code?
Added a unit test to verify that the exception is handled and the correct logs are written.