Get rid of 1 perpetually unused connection in our app

This commit is contained in:
Alan Rominger
2023-04-11 17:04:59 -04:00
parent ffa3cd1fff
commit 3cd5d59d87

View File

@@ -98,6 +98,7 @@ class Command(BaseCommand):
try:
executor = MigrationExecutor(connection)
migrating = bool(executor.migration_plan(executor.loader.graph.leaf_nodes()))
connection.close() # Because of async nature, main loop will use new connection, so close this
except Exception as exc:
logger.warning(f'Error on startup of run_wsrelay (error: {exc}), retry in 10s...')
time.sleep(10)