Skip to content
Permalink
Browse files
fix: remove erroneous timeouts for batch_create_session calls (#18)
* 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 997a03477b07ec39c718480d9bfe729404bf5748
Showing with 2 additions and 8 deletions.
  1. +2 −8 google/cloud/spanner_v1/pool.py
@@ -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()
@@ -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()

0 comments on commit 997a034

Please sign in to comment.