Skip to content
New issue

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

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

Already on GitHub? # to your account

Redo wrap_exception and add one for the Django Connector #1014

Merged
merged 3 commits into from
Mar 23, 2024

Conversation

ewjoachim
Copy link
Member

Closes #981

Django connector was missing an exception mapper transforming Psycopg (2 or 3) exceptions to procrastinate exception, especially the queueing lock exception that we handle gracefully.

In order to make a proper implementation, I redid wrap_exceptions everywhere using contextlib.contextmanager.

Successful PR Checklist:

  • Tests
    • (not applicable?)
  • Documentation
    • (not applicable?)

PR label(s):

@ewjoachim ewjoachim requested a review from a team as a code owner March 23, 2024 13:04
@github-actions github-actions bot added the PR type: bugfix 🕵️ Contains bug fix label Mar 23, 2024
@ewjoachim ewjoachim changed the title Add test for wrap_exceptions Redo wrap_exception and add one for the Django Connector Mar 23, 2024
@ewjoachim ewjoachim enabled auto-merge March 23, 2024 13:27
@ewjoachim ewjoachim merged commit 72c2382 into main Mar 23, 2024
9 checks passed
@ewjoachim ewjoachim deleted the missing_exception_wrapper branch March 23, 2024 13:27
Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  procrastinate
  psycopg_connector.py
  sync_psycopg_connector.py
  utils.py
  procrastinate/contrib/aiopg
  aiopg_connector.py
  procrastinate/contrib/django
  django_connector.py
  procrastinate/contrib/psycopg2
  psycopg2_connector.py
  procrastinate/contrib/sqlalchemy
  psycopg2_connector.py
Project Total  

This report was generated by python-coverage-comment-action

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
PR type: bugfix 🕵️ Contains bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors with v2
1 participant