Code Review
/
pti
/
o2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Docs: Move RTP to INF, make sure most of the O-Cloud word change to INF O2 service
[pti/o2.git]
/
o2app
/
bootstrap.py
diff --git
a/o2app/bootstrap.py
b/o2app/bootstrap.py
index
7a074f6
..
6c5b276
100644
(file)
--- a/
o2app/bootstrap.py
+++ b/
o2app/bootstrap.py
@@
-20,8
+20,9
@@
from o2common.adapter.notifications import AbstractNotifications,\
SmoO2Notifications
from o2common.adapter import redis_eventpublisher
from o2common.service import unit_of_work
SmoO2Notifications
from o2common.adapter import redis_eventpublisher
from o2common.service import unit_of_work
+from o2common.service import messagebus
-from o2app.service import handlers
, messagebus
+from o2app.service import handlers
from o2app.adapter.unit_of_work import SqlAlchemyUnitOfWork
from o2ims.adapter import orm as o2ims_orm
from o2app.adapter.unit_of_work import SqlAlchemyUnitOfWork
from o2ims.adapter import orm as o2ims_orm
@@
-71,11
+72,13
@@
def bootstrap(
for command_type, handler in handlers.COMMAND_HANDLERS.items()
}
for command_type, handler in handlers.COMMAND_HANDLERS.items()
}
-
return
messagebus.MessageBus(
+
bus =
messagebus.MessageBus(
uow=uow,
event_handlers=injected_event_handlers,
command_handlers=injected_command_handlers,
)
uow=uow,
event_handlers=injected_event_handlers,
command_handlers=injected_command_handlers,
)
+ messagebus.MessageBus.set_instance(bus)
+ return bus
def inject_dependencies(handler, dependencies):
def inject_dependencies(handler, dependencies):