Skip to content

Commit 74821f8

Browse files
committed
fix: Access actual client from holder in flush worker
The flush worker was calling _flush() on _TelemetryClientHolder objects instead of the actual TelemetryClient. Fixed by accessing holder.client before calling _flush(). Fixes AttributeError in e2e tests: '_TelemetryClientHolder' object has no attribute '_flush'
1 parent 91b8382 commit 74821f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/databricks/sql/telemetry/telemetry_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ def _flush_worker(cls):
504504
with cls._lock:
505505
clients_to_flush = list(cls._clients.values())
506506

507-
for client in clients_to_flush:
508-
client._flush()
507+
for holder in clients_to_flush:
508+
holder.client._flush()
509509

510510
@classmethod
511511
def _stop_flush_thread(cls):

0 commit comments

Comments
 (0)