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_next_poll_set(self, up_to_epoch): """ grabs a range up to current time() from 'all' gid set @return: batch of gids to process or None if cursor reset is required """ return self.rc.zrangebyscore(S1.gid_set('all'), 0, up_to_epoch, start=0, num=200, withscores=False)
def add_gid_set(self, gid, at_epoch): self.rc.zadd(S1.gid_set('all'), gid, at_epoch)