Use dispose_pool() from oslo.db

Depricate dispose() in db/api.py and use context_manager.dispose_pool()
instread of it.

Change-Id: I6f0d108fc00cc7fcfaac1bd8f1b0468fcfbaa0dd
This commit is contained in:
Ann Kamyshnikova
2016-08-12 15:26:02 +03:00
parent 122a971656
commit 230066af90
3 changed files with 5 additions and 6 deletions

View File

@@ -241,7 +241,7 @@ def _start_workers(workers):
# dispose the whole pool before os.fork, otherwise there will
# be shared DB connections in child processes which may cause
# DB errors.
session.dispose()
session.context_manager.dispose_pool()
for worker in process_workers:
worker_launcher.launch_service(worker,