Skip to content

Commit

Permalink
fix: remove erroneous timeouts for batch_create_session calls (#18)
Browse files Browse the repository at this point in the history
* fix: remove erroneous timeouts for batch_create_session calls in session pools

* blacken
  • Loading branch information
larkee committed Feb 19, 2020
1 parent b315593 commit 997a034
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions google/cloud/spanner_v1/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,7 @@ def bind(self, database):

while not self._sessions.full():
resp = api.batch_create_sessions(
database.name,
self.size - self._sessions.qsize(),
timeout=self.default_timeout,
metadata=metadata,
database.name, self.size - self._sessions.qsize(), metadata=metadata
)
for session_pb in resp.session:
session = self._new_session()
Expand Down Expand Up @@ -365,10 +362,7 @@ def bind(self, database):

while created_session_count < self.size:
resp = api.batch_create_sessions(
database.name,
self.size - created_session_count,
timeout=self.default_timeout,
metadata=metadata,
database.name, self.size - created_session_count, metadata=metadata
)
for session_pb in resp.session:
session = self._new_session()
Expand Down

0 comments on commit 997a034

Please sign in to comment.