Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions google/cloud/alloydbconnector/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,10 @@ async def get_connection_info(
"""
priv_key, pub_key = await keys

# before making AlloyDB API calls, refresh creds if required
# Before making AlloyDB API calls, refresh creds if required
# Run refresh in a separate thread to avoid blocking the main thread.
if not self._credentials.token_state == TokenState.FRESH:
self._credentials.refresh(requests.Request())
await asyncio.to_thread(self._credentials.refresh, requests.Request())

# fetch metadata
metadata_task = asyncio.create_task(
Expand Down