示例#1
0
 def roomStatus(self):
     if not public.keyExists('flush'):
         print('flush')
         public.setRedis('flush', True, expire=8, forever=False)
         self.flush()
     if public.keyExists('roomStatus'):
         return eval(public.getRedis('roomStatus'))
     else:
         return {}
示例#2
0
 def today(self, status):
     public.setRedis('today', status, forever=True)
示例#3
0
 def tomorrow(self, status):
     public.setRedis('tomorrow', status, forever=True)
示例#4
0
 def me(self, status):
     public.setRedis('me', status, forever=True)
示例#5
0
 def isRed(self, status):
     public.setRedis('isRed', status, forever=True)
示例#6
0
 def title(self, mess):
     public.setRedis('title', mess, forever=True)
示例#7
0
 def message(self, mess):
     public.setRedis('close_mess', mess, forever=True)
示例#8
0
 def detect(self, status):
     public.setRedis('detect', status, forever=True)
示例#9
0
 def mon(self, status):
     public.setRedis('mon', status, forever=True)
示例#10
0
 def _users(self, u):
     if type(u) is not dict:
         raise TypeError
     public.setRedis('users', u, forever=True)
示例#11
0
 def roomStatus(self, value):
     if type(value) is not dict:
         raise TypeError
     public.setRedis('roomStatus', value, forever=True)
示例#12
0
 def _usersOnRunning(self, value):
     if type(value) is not dict:
         raise TypeError
     else:
         public.setRedis('_usersOnRunning', value, forever=True)
 def __init__(self):
     self.monitor = Monitor()
     if public.keyExists('error'):
         self.monitor.deleteMon()
     public.setRedis('error', True, expire=100, forever=False)
     self.sleeping = 2