Skip to content

Commit

Permalink
Use forked django-dbconn-retry (#4113)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimasciput authored Jul 25, 2024
1 parent 9e310a9 commit 80499da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bims/tasks/email_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import zipfile

from celery import shared_task
from django.db import DatabaseError, connection, InterfaceError
from django.db import DatabaseError, connection, OperationalError
from openpyxl import load_workbook

from bims.utils.domain import get_current_domain
Expand Down Expand Up @@ -52,7 +52,7 @@ def send_csv_via_email(
download_request.request_file = csv_file
try:
download_request.save()
except (DatabaseError, InterfaceError):
except (DatabaseError, OperationalError):
# Attempt to reconnect and save again
connection.connect()
download_request.save()
Expand Down
2 changes: 1 addition & 1 deletion deployment/docker/REQUIREMENTS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ celery==5.3.6
django-celery-results==2.5.1
django-tenants==3.6.1
tenant-schemas-celery==2.2.0
django-dbconn-retry==0.1.7
git+https://github.com/dimasciput/django-dbconn-retry.git
2 changes: 1 addition & 1 deletion deployment/production/REQUIREMENTS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ celery==5.3.6
django-celery-results==2.5.1
django-tenants==3.6.1
tenant-schemas-celery==2.2.0
django-dbconn-retry==0.1.7
git+https://github.com/dimasciput/django-dbconn-retry.git

0 comments on commit 80499da

Please sign in to comment.