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

Updates exception handling to use Django DatabaseError class #144

Merged
merged 1 commit into from
Oct 6, 2016

Conversation

hanleyhansen
Copy link
Member

Addresses #142

Using Django’s DatabaseError class as the exception to catch keeps the
library and this try catch database platform agnostic. That way
developers who have a Postgres or MySQL backend should mutually benefit
from this retry.

Addresses #142

Using Django’s DatabaseError class as the exception to catch keeps the
library and this try catch database platform agnostic. That way
developers who have a Postgres or MySQL backend should mutually benefit
from this retry.
@hanleyhansen
Copy link
Member Author

@avelis code changes look perfect. Exactly what I was going to do. Travis-CI is complaining about that one test for the 3.4 environment. Same intermittent test that has failed for us before:

FAIL: test_time_spent_db_with_path (tests.test_view_requests.TestGetObjects)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/django-silk/silk/project/tests/test_view_requests.py", line 98, in test_time_spent_db_with_path
    self.assertTrue(num_results)
AssertionError: 0 is not true

So I think we can ignore that. Unfortunately I'm at the car dealership right now so I only have my work laptop on me but when I get home I can test this branch against the code that was causing the error and report back.

Up to you if you want to wait for that or if you wanna just go ahead and merge. Everything looks good to me.

@avelis avelis merged commit 35331ac into master Oct 6, 2016
@avelis
Copy link
Collaborator

avelis commented Oct 6, 2016

@hanleyhansen I have gone ahead & merged. Thanks for checking on the pull request for me.

@avelis avelis deleted the database-error-try-catch branch October 6, 2016 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants