Use psycogreen for PG backend
Change-Id: Ia2037cf26614cb4091a5c57a94a3c3a0af0ed70c Closes-bug: #1546976
This commit is contained in:
parent
302affe6aa
commit
300798c8f2
@ -55,6 +55,8 @@
|
|||||||
- tox
|
- tox
|
||||||
- riak
|
- riak
|
||||||
- pbr
|
- pbr
|
||||||
|
# for pg backend
|
||||||
|
- psycogreen
|
||||||
|
|
||||||
# pre install solare requirements
|
# pre install solare requirements
|
||||||
- shell: pip install -r https://raw.githubusercontent.com/openstack/solar/master/requirements.txt
|
- shell: pip install -r https://raw.githubusercontent.com/openstack/solar/master/requirements.txt
|
||||||
|
@ -29,6 +29,7 @@ wrapt
|
|||||||
peewee
|
peewee
|
||||||
# if you want to use sql + postgresql then
|
# if you want to use sql + postgresql then
|
||||||
# psycopg2
|
# psycopg2
|
||||||
|
# psycogreen
|
||||||
|
|
||||||
# if you want to use lua computable inputs
|
# if you want to use lua computable inputs
|
||||||
# lupa
|
# lupa
|
||||||
|
@ -64,7 +64,11 @@ elif _connection.mode == 'riak':
|
|||||||
|
|
||||||
elif _connection.mode == 'postgresql':
|
elif _connection.mode == 'postgresql':
|
||||||
# TODO: collation has to be `C`
|
# TODO: collation has to be `C`
|
||||||
|
import psycogreen.gevent
|
||||||
|
psycogreen.gevent.patch_psycopg()
|
||||||
|
|
||||||
from solar.dblayer.sql_client import SqlClient
|
from solar.dblayer.sql_client import SqlClient
|
||||||
|
|
||||||
opts = {'autocommit': False}
|
opts = {'autocommit': False}
|
||||||
opts.update(_connection_details.toDict())
|
opts.update(_connection_details.toDict())
|
||||||
if _connection.port:
|
if _connection.port:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user