MCPcopy Index your code
hub / github.com/google/adk-python / cleanup_clients

Function cleanup_clients

src/google/adk/tools/pubsub/client.py:153–165  ·  view source on GitHub ↗

Clean up all cached Pub/Sub clients.

()

Source from the content-addressed store, hash-verified

151
152
153def cleanup_clients():
154 """Clean up all cached Pub/Sub clients."""
155 global _publisher_client_cache, _subscriber_client_cache
156
157 with _publisher_client_lock:
158 for client, _ in _publisher_client_cache.values():
159 client.transport.close()
160 _publisher_client_cache.clear()
161
162 with _subscriber_client_lock:
163 for client, _ in _subscriber_client_cache.values():
164 client.close()
165 _subscriber_client_cache.clear()

Callers

nothing calls this directly

Calls 3

valuesMethod · 0.45
closeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected