X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2app%2Fbootstrap.py;h=7679ef325e19f167b0db1a53802884751af5f3ff;hb=f037dc6efe1d1bd68d2b01b229c15d5b6db00f9c;hp=6c5b276371dd1192b739a334494cce81967b9b15;hpb=81cd55de0440dcbc8df4d788565295d051ca91ad;p=pti%2Fo2.git diff --git a/o2app/bootstrap.py b/o2app/bootstrap.py index 6c5b276..7679ef3 100644 --- a/o2app/bootstrap.py +++ b/o2app/bootstrap.py @@ -17,7 +17,7 @@ import inspect from typing import Callable from o2common.adapter.notifications import AbstractNotifications,\ - SmoO2Notifications + NoneNotifications from o2common.adapter import redis_eventpublisher from o2common.service import unit_of_work from o2common.service import messagebus @@ -28,6 +28,7 @@ from o2app.adapter.unit_of_work import SqlAlchemyUnitOfWork from o2ims.adapter import orm as o2ims_orm from o2dms.adapter import orm as o2dms_orm + from o2common.helper import o2logging logger = o2logging.get_logger(__name__) @@ -48,12 +49,13 @@ def bootstrap( ) -> messagebus.MessageBus: if notifications is None: - notifications = SmoO2Notifications() + notifications = NoneNotifications() if start_orm: with uow: # get default engine if uow is by default engine = uow.session.get_bind() + wait_for_db_ready(engine) o2ims_orm.start_o2ims_mappers(engine) o2dms_orm.start_o2dms_mappers(engine)