Skip to content

Commit

Permalink
Merge pull request #60 from roy2220/master
Browse files Browse the repository at this point in the history
Fix PooledMySQLDatabase.init() min_connections/max_connections arguments have no effect
  • Loading branch information
rudyryk committed Apr 11, 2017
2 parents 9ef7b84 + 3b4e23e commit 3ef29d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions peewee_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -1332,9 +1332,11 @@ class PooledMySQLDatabase(MySQLDatabase):
http://peewee.readthedocs.io/en/latest/peewee/api.html#MySQLDatabase
"""
def init(self, database, **kwargs):
self.min_connections = kwargs.pop('min_connections', 1)
self.max_connections = kwargs.pop('max_connections', 10)
min_connections = kwargs.pop('min_connections', 1)
max_connections = kwargs.pop('max_connections', 10)
super().init(database, **kwargs)
self.min_connections = min_connections
self.max_connections = max_connections


##############
Expand Down

0 comments on commit 3ef29d4

Please sign in to comment.