def get_data(self, session): for item in pubsub_topic_list(session, self.request.input.cluster_id, False): item.current_depth = self.pubsub.get_topic_depth(item.name) item.consumers_count = self.pubsub.get_consumers_count(item.name) item.producers_count = self.pubsub.get_producers_count(item.name) item.last_pub_time = self.pubsub.get_last_pub_time(item.name) yield item
def get_pubsub_topic_list(self, cluster_id, needs_columns=False): """ Returns a list of pub/sub topics defined on a cluster. """ return query.pubsub_topic_list(self._session, cluster_id, needs_columns)