Skip to content

Commit

Permalink
In MessageBus, keep history for entities not referenced in chains
Browse files Browse the repository at this point in the history
  • Loading branch information
user committed Dec 14, 2024
1 parent 088c0b4 commit 4a51f46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions avtdl/core/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ def pub(self, topic: str, message: Record):

generic_topic = self._generic_topic(specific_topic)
self.add_to_history(generic_topic, targeted_message)
if not matching_callbacks:
# topic has no subscribers, meaning entity is not referenced in chains
self.add_to_history(self._generic_topic(topic), message)

def add_to_history(self, topic: str, message: Record):
self.history[topic].append(message)
Expand Down

0 comments on commit 4a51f46

Please sign in to comment.