-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.An internal cleanup or hygiene concern.
Description
Currently, we use one client session per instance. Instead, we should use one client session per connector.
cloud-sql-python-connector/google/cloud/sql/connector/instance.py
Lines 184 to 194 in 32c6481
| def _client_session(self) -> aiohttp.ClientSession: | |
| if self.__client_session is None: | |
| headers = { | |
| "x-goog-api-client": self._user_agent_string, | |
| "User-Agent": self._user_agent_string, | |
| "Content-Type": "application/json", | |
| } | |
| if self._quota_project: | |
| headers["x-goog-user-project"] = self._quota_project | |
| self.__client_session = aiohttp.ClientSession(headers=headers) | |
| return self.__client_session |
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.An internal cleanup or hygiene concern.