Skip to content

Commit 3eabac9

Browse files
committed
formatting, added walrus
Signed-off-by: Sai Shree Pradhan <saishree.pradhan@databricks.com>
1 parent ca8b958 commit 3eabac9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/databricks/sql/telemetry/telemetry_client.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,7 @@ def _initialize():
322322
_executor = ThreadPoolExecutor(max_workers=10)
323323
_install_exception_hook()
324324
_initialized = True
325-
logger.debug(
326-
"Telemetry system initialized with thread pool (max_workers=10)"
327-
)
325+
logger.debug("Telemetry system initialized with thread pool (max_workers=10)")
328326

329327

330328
def _install_exception_hook():
@@ -398,9 +396,9 @@ def close_telemetry_client(session_id_hex):
398396
"""Remove the telemetry client for a specific connection"""
399397
global _initialized, _executor
400398
with _lock:
401-
# if (telemetry_client := _clients.pop(session_id_hex, None)) is not None:
402-
if session_id_hex in _clients:
403-
telemetry_client = _clients.pop(session_id_hex)
399+
if (telemetry_client := _clients.pop(session_id_hex, None)) is not None:
400+
# if session_id_hex in _clients:
401+
# telemetry_client = _clients.pop(session_id_hex)
404402
logger.debug("Removing telemetry client for connection %s", session_id_hex)
405403
telemetry_client.close()
406404

0 commit comments

Comments
 (0)