From 8d74a46d7cb4636b4f605f70daae1435dbcd24cc Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 8 Aug 2023 11:57:57 -0700 Subject: [PATCH] add noqa for some db methods --- app/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index c1419165e..0d441e67f 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -357,17 +357,17 @@ def setup_sqlalchemy_events(app): # need this or db.engine isn't accessible with app.app_context(): @event.listens_for(db.engine, 'connect') - def connect(): + def connect(dbapi_connection, connection_record): # noqa # connection first opened with db TOTAL_DB_CONNECTIONS.inc() @event.listens_for(db.engine, 'close') - def close(): + def close(dbapi_connection, connection_record): # noqa # connection closed (probably only happens with overflow connections) TOTAL_DB_CONNECTIONS.dec() @event.listens_for(db.engine, 'checkout') - def checkout(connection_record): + def checkout(dbapi_connection, connection_record, connection_proxy): # noqa try: # connection given to a web worker TOTAL_CHECKED_OUT_DB_CONNECTIONS.inc() @@ -405,7 +405,7 @@ def setup_sqlalchemy_events(app): current_app.logger.exception("Exception caught for checkout event.") @event.listens_for(db.engine, 'checkin') - def checkin(connection_record): + def checkin(dbapi_connection, connection_record): # noqa try: # connection returned by a web worker TOTAL_CHECKED_OUT_DB_CONNECTIONS.dec()