Example #1
0
    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
Example #2
0
 def set_poller_stats(self, name, hour, day):
     self.rc.hset(S1.poller_key_fmt(name), 'hour', hour)
     self.rc.hset(S1.poller_key_fmt(name), 'day', day)