def get_poller_stats_ex(self): return dict(all_count=self.rc.zcard(S1.gid_set('all')), pollers=self.get_poller_stats(), poller_names=list(self.rc.smembers(S1.poller_set())), register_set_len=self.rc.scard(S1.register_set()), poll_list_len=self.rc.llen(S1.poller_channel_name('all')))
def get_poller_stats(self): pollers = [{ 'name': k, 'hour': self.rc.hget(S1.poller_key_fmt(k), 'hour'), 'day': self.rc.hget(S1.poller_key_fmt(k), 'day') } for k in self.rc.smembers(S1.poller_set())] return pollers