def is_poll_after(self, gid, stamp): polled_str = self.rc.hget(S1.cache_key(gid), S1.polled_key()) if polled_str: polled = float(polled_str) if polled >= stamp: return True return False
def get_poll_stamp(self, gid): polled_str = self.rc.hget(S1.cache_key(gid), S1.polled_key()) if polled_str: return float(polled_str) return 0
def set_poll_stamp(self, gid, stamp): self.rc.hset(S1.cache_key(gid), S1.polled_key(), stamp)