示例#1
0
 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
示例#2
0
 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
示例#3
0
 def set_poll_stamp(self, gid, stamp):
     self.rc.hset(S1.cache_key(gid), S1.polled_key(), stamp)