def _get_subscriptions(self, topic): pattern = repos.Pattern(topic) subscribers = self.subscriptions.get_subscriptions_by_pattern(pattern) if not subscribers: logger.info("Nobody to notify about the topic %s", topic) else: logger.info("The topic %s has %s subscriber(s)", topic, len(subscribers)) return subscribers
def _get_subscribers(self, predicate): pattern = repos.Pattern(predicate) subscribers = self.subscriptions.get_subscriptions_by_pattern(pattern) if not subscribers: logger.info("Nobody to notify about the message %s", predicate) return subscribers