fixed typo on connection recovery

This commit is contained in:
Adolfo Gómez García 2020-10-20 11:29:46 +02:00
parent 61750f2f94
commit 6dc6f5954b

View File

@ -202,7 +202,7 @@ class Scheduler:
if not isinstance(e, DatabaseError):
logger.error('Unexpected exception at run loop %s: %s', e.__class__, e)
try:
connection.close()
connections['default'].close()
except Exception:
logger.exception('Exception clossing connection at delayed task')
logger.info('Exiting Scheduler because stop has been requested')