diff --git a/src/db/db_connection.py b/src/db/db_connection.py index 167c306..dd208dc 100644 --- a/src/db/db_connection.py +++ b/src/db/db_connection.py @@ -85,9 +85,10 @@ def initialize_pool(): logger.error(f"Error initializing pool connection: {str(e)}") break -def get_client(): +def create_client(): """ - Get a client from the pool or create a new one if needed + Get a client from the pool or create a new one if needed. + Maintains the original function name for compatibility. """ # Initialize pool if empty with pool_lock: @@ -124,3 +125,6 @@ def return_client(client): client.close() except Exception as e: logger.warning(f"Error returning client to pool: {str(e)}") + +# Export the create_client function +__all__ = ['create_client']