Skip to content

Commit

Permalink
Merge pull request #11 from ggouzi/add-get-pool-size
Browse files Browse the repository at this point in the history
Add get pool size
  • Loading branch information
prprprus authored Oct 23, 2019
2 parents d1accc8 + 40ddfd0 commit 8307402
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pymysqlpool/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ def __get_safe_conn(self, retry_count):
if c: self.inuse_list.add(c)
return c

def get_pool_size(self):
"""Get current pool size"""
return self.current_size

def release(self, c):
"""Release connection from inuse_list to unuse_list"""
with self.cond:
Expand Down

0 comments on commit 8307402

Please sign in to comment.