Skip to content

Instantly share code, notes, and snippets.

@adiroiban
Last active December 15, 2015 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adiroiban/5244959 to your computer and use it in GitHub Desktop.
Save adiroiban/5244959 to your computer and use it in GitHub Desktop.
dbpool
def __init__(self, url, pool_size_min=3, pool_size_max=8):
self._url = url
self._db_config = DBConfiguration(url)
self._pool = ConnectionPool(
self._db_config.driver_name,
cp_min=pool_size_min,
cp_max=pool_size_max,
**self._db_config.driver_arguments,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment