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
Add oAuth2 for subscription and registration with SMO
[pti/o2.git]
/
o2common
/
service
/
messagebus.py
diff --git
a/o2common/service/messagebus.py
b/o2common/service/messagebus.py
index
6c60c28
..
8c76ce6
100644
(file)
--- a/
o2common/service/messagebus.py
+++ b/
o2common/service/messagebus.py
@@
-27,6
+27,16
@@
Message = Union[commands.Command, events.Event]
class MessageBus:
class MessageBus:
+ __instance: MessageBus = None
+
+ @staticmethod
+ def set_instance(instance: MessageBus):
+ MessageBus.__instance = instance
+
+ @staticmethod
+ def get_instance() -> MessageBus:
+ return MessageBus.__instance
+
def __init__(
self,
uow: unit_of_work.AbstractUnitOfWork,
def __init__(
self,
uow: unit_of_work.AbstractUnitOfWork,