diff --git a/trytond/pooler.py b/trytond/pooler.py index 7973c9fe73..f5aeb2b977 100644 --- a/trytond/pooler.py +++ b/trytond/pooler.py @@ -82,14 +82,15 @@ def close_db(db_name): finally: _LOCK.release() -def get_db_only(db_name): +def get_db_only(db_name, verbose=True): _LOCK.acquire() try: if db_name in _DB: database = _DB[db_name] else: - logging.getLogger('pooler').info( - 'Connecting to %s' % (db_name)) + if verbose: + logging.getLogger('pooler').info( + 'Connecting to %s' % (db_name)) database = db_connect(db_name) _DB[db_name] = database finally: diff --git a/trytond/web_service/db.py b/trytond/web_service/db.py index 14d3c68a13..0887fdeab3 100644 --- a/trytond/web_service/db.py +++ b/trytond/web_service/db.py @@ -222,7 +222,7 @@ class DB(Service): "ORDER BY datname") res = [] for db_name, in cursor.fetchall(): - cursor2 = pooler.get_db_only(db_name).cursor() + cursor2 = pooler.get_db_only(db_name, verbose=False).cursor() if not cursor2.test(): cursor2.close() pooler.close_db(db_name)