Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Apr 24, 2024
1 parent caf56fb commit 01120cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/tasks/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


@task_postrun.connect
def on_task_done(sender=None, headers=None, body=None, **kwargs):
def on_task_done(sender=None, headers=None, body=None, **kwargs): # pylint: disable=unused-argument
for conn in db.connections.all():
try:
conn.close_if_unusable_or_obsolete()
Expand All @@ -12,4 +12,4 @@ def on_task_done(sender=None, headers=None, body=None, **kwargs):
except db.DatabaseError as exc:
str_exc = str(exc)
if 'closed' not in str_exc and 'not connected' not in str_exc:
raise exc
raise exc

0 comments on commit 01120cf

Please sign in to comment.