Remove unused functions from DB module
This is a trivial PS that removes 2 unused functions from the DB module. Change-Id: I5c84d0b9d7b4c7e64a3608dcc5cc5262e0b9424a
This commit is contained in:
parent
6a521e2eb9
commit
4a586e370e
|
@ -43,15 +43,6 @@ _FACADE = None
|
|||
_LOCK = threading.Lock()
|
||||
|
||||
|
||||
def _retry_on_deadlock(exc):
|
||||
"""Decorator to retry a DB API call if Deadlock was received."""
|
||||
|
||||
if isinstance(exc, db_exception.DBDeadlock):
|
||||
LOG.warn("Deadlock detected. Retrying...")
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _create_facade_lazily():
|
||||
global _LOCK, _FACADE
|
||||
if _FACADE is None:
|
||||
|
@ -73,12 +64,6 @@ def get_session(autocommit=True, expire_on_commit=False):
|
|||
expire_on_commit=expire_on_commit)
|
||||
|
||||
|
||||
def clear_db_env():
|
||||
"""Unset global configuration variables for database."""
|
||||
global _FACADE
|
||||
_FACADE = None
|
||||
|
||||
|
||||
def drop_db():
|
||||
models.unregister_models(get_engine())
|
||||
|
||||
|
|
Loading…
Reference in New Issue