Skip to content

Commit 2cdb760

Browse files
committed
reverting change in close in telemetry client
Signed-off-by: Sai Shree Pradhan <saishree.pradhan@databricks.com>
1 parent c68e42f commit 2cdb760

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/databricks/sql/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def _close(self, close_cursors=True) -> None:
470470

471471
self.open = False
472472

473-
TelemetryClientFactory.close(self.get_session_id_hex())
473+
self._telemetry_client.close()
474474

475475
def commit(self):
476476
"""No-op because Databricks does not support transactions"""

src/databricks/sql/telemetry/telemetry_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ def close(self):
300300
"""Flush remaining events before closing"""
301301
logger.debug("Closing TelemetryClient for connection %s", self._connection_uuid)
302302
self._flush()
303+
TelemetryClientFactory.close(self._connection_uuid)
303304

304305

305306
class TelemetryClientFactory:
@@ -415,7 +416,6 @@ def close(connection_uuid):
415416
logger.debug(
416417
"Removing telemetry client for connection %s", connection_uuid
417418
)
418-
TelemetryClientFactory.get_telemetry_client(connection_uuid).close()
419419
TelemetryClientFactory._clients.pop(connection_uuid, None)
420420

421421
# Shutdown executor if no more clients

0 commit comments

Comments
 (0)