Closed rooterkyberian closed 1 month ago
is this fixed, or how can we use this package with the version 3 of psycopg?
IIRC only adjustment necessary was in https://github.com/jdelic/django-dbconn-retry/blob/4110c1a36e54e45bfabd51df28957442cfe938a3/django_dbconn_retry/apps.py#L18-L25
i.e. you can monkey patch it like this:
import psycopg
import django_dbconn_retry.apps
django_dbconn_retry.apps._operror_types += (psycopg.OperationalError, )
I see there is PR with fix here: https://github.com/jdelic/django-dbconn-retry/pull/42
v0.1.8 includes these changes. Thank you.
psycopg3 is not supported at the moment;
Seems like this (and similar issues in the future) can be avoided if with self.wrap_database_errors: will be used inside try-except instead of outside. I can create a PR to that effect if it makes sense to you as well :)