Skip to content

Commit

Permalink
Merge pull request #12 from RedMarkerTech/ssl
Browse files Browse the repository at this point in the history
support passing any config to connection
  • Loading branch information
prprprus authored Nov 8, 2019
2 parents 1d22d7c + fc421c2 commit d20593b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pymysqlpool/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def __init__(self,
multiple=4,
counter=0,
accumulation=0,
ping_check: (int, bool) = False):
ping_check: (int, bool) = False,
**configs):
self.host = host
self.port = port
self.user = user
Expand Down Expand Up @@ -106,6 +107,7 @@ def __init__(self,
self.ping_check = ping_check

self.unix_socket=unix_socket
self.configs=configs

def create_conn(self):
"""Create mysql connection by pymysql and to add unuse_list"""
Expand All @@ -118,7 +120,8 @@ def create_conn(self):
charset=self.charset,
cursorclass=self.cursorclass,
autocommit=self.autocommit,
unix_socket=self.unix_socket
unix_socket=self.unix_socket,
**self.configs
)
self.unuse_list.add(c)

Expand Down

0 comments on commit d20593b

Please sign in to comment.