Commit 2bce0ae0 authored by delanoe's avatar delanoe

[FIX] pool engine. (maybe need to close somme connexions.

parent 10bdab18
...@@ -12,9 +12,10 @@ def get_engine(): ...@@ -12,9 +12,10 @@ def get_engine():
url = 'postgresql+psycopg2://{USER}:{PASSWORD}@{HOST}:{PORT}/{NAME}'.format( url = 'postgresql+psycopg2://{USER}:{PASSWORD}@{HOST}:{PORT}/{NAME}'.format(
**settings.DATABASES['default'] **settings.DATABASES['default']
) )
return create_engine(url, return create_engine( url
use_native_hstore = True, , use_native_hstore = True
json_serializer = json_dumps, , json_serializer = json_dumps
, pool_size=20, max_overflow=0
) )
engine = get_engine() engine = get_engine()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment