Skip to content

Commit c94182c

Browse files
committed
Add prioritized callbacks to Message Bus
Priority from 1 to 100, with 1 being highest
1 parent af14c58 commit c94182c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

message_bus_tools.py

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def unsubscribe(self, event_type, uid):
9595
def publish(self, event_type: Message, data):
9696
self.lock_count += 1
9797
if event_type in self.subscribers:
98+
9899
sorted_callbacks = sorted([(x[1][0], x[1][1]) for x in self.subscribers[event_type].items()], key=lambda x: x[1])
99100
for callback, priority in sorted_callbacks:
100101
if self.debug:

0 commit comments

Comments
 (0)