Merge "Add use_slave DB api support"
This commit is contained in:
commit
25bcbfdbd4
@ -46,11 +46,12 @@ def dispose():
|
||||
get_engine().pool.dispose()
|
||||
|
||||
|
||||
def get_session(autocommit=True, expire_on_commit=False):
|
||||
def get_session(autocommit=True, expire_on_commit=False, use_slave=False):
|
||||
"""Helper method to grab session."""
|
||||
facade = _create_facade_lazily()
|
||||
return facade.get_session(autocommit=autocommit,
|
||||
expire_on_commit=expire_on_commit)
|
||||
expire_on_commit=expire_on_commit,
|
||||
use_slave=use_slave)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
Loading…
Reference in New Issue
Block a user