Merge "minimise ceilometer memory usage"
This commit is contained in:
commit
c5b76e3c9c
@ -20,7 +20,6 @@ from __future__ import absolute_import
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from oslo.db.sqlalchemy import migration
|
|
||||||
from oslo.db.sqlalchemy import session as db_session
|
from oslo.db.sqlalchemy import session as db_session
|
||||||
from sqlalchemy import desc
|
from sqlalchemy import desc
|
||||||
|
|
||||||
@ -87,6 +86,8 @@ class Connection(base.Connection):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def upgrade(self):
|
def upgrade(self):
|
||||||
|
# NOTE(gordc): to minimise memory, only import migration when needed
|
||||||
|
from oslo.db.sqlalchemy import migration
|
||||||
path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
|
path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
|
||||||
'..', '..', 'storage', 'sqlalchemy',
|
'..', '..', 'storage', 'sqlalchemy',
|
||||||
'migrate_repo')
|
'migrate_repo')
|
||||||
|
@ -24,7 +24,6 @@ import os
|
|||||||
|
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
from oslo.db import exception as dbexc
|
from oslo.db import exception as dbexc
|
||||||
from oslo.db.sqlalchemy import migration
|
|
||||||
from oslo.db.sqlalchemy import session as db_session
|
from oslo.db.sqlalchemy import session as db_session
|
||||||
from oslo.utils import timeutils
|
from oslo.utils import timeutils
|
||||||
import six
|
import six
|
||||||
@ -227,6 +226,8 @@ class Connection(base.Connection):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def upgrade(self):
|
def upgrade(self):
|
||||||
|
# NOTE(gordc): to minimise memory, only import migration when needed
|
||||||
|
from oslo.db.sqlalchemy import migration
|
||||||
path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
|
path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
|
||||||
'sqlalchemy', 'migrate_repo')
|
'sqlalchemy', 'migrate_repo')
|
||||||
migration.db_sync(self._engine_facade.get_engine(), path)
|
migration.db_sync(self._engine_facade.get_engine(), path)
|
||||||
|
Loading…
Reference in New Issue
Block a user