Fix websocket relay. Set autocommit so conn.notifies() does not blocks forever (#15043)

Without autocommit conn.notifies() blocks forever
This commit is contained in:
Chris Meyers 2024-03-27 15:11:17 -04:00 committed by GitHub
parent f48b2d1ae5
commit 0b5e59d9cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -324,6 +324,7 @@ class WebSocketRelayManager(object):
port=database_conf['PORT'],
**database_conf.get("OPTIONS", {}),
)
await async_conn.set_autocommit(True)
task = event_loop.create_task(self.on_ws_heartbeat(async_conn), name="on_ws_heartbeat")
logger.info("Creating `on_ws_heartbeat` task in event loop.")