Skip to content

Commit 8307402

Browse files
authored
Merge pull request #11 from ggouzi/add-get-pool-size
Add get pool size
2 parents d1accc8 + 40ddfd0 commit 8307402

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pymysqlpool/pool.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ def __get_safe_conn(self, retry_count):
183183
if c: self.inuse_list.add(c)
184184
return c
185185

186+
def get_pool_size(self):
187+
"""Get current pool size"""
188+
return self.current_size
189+
186190
def release(self, c):
187191
"""Release connection from inuse_list to unuse_list"""
188192
with self.cond:

0 commit comments

Comments
 (0)