Ejemplo n.º 1
0
 def VerifyToken(self, client, account_id, token):
     cmd = redispool.RedisCommand(index=self.HashIndex(account_id),
                                  func=self.VerifyTokenFunc,
                                  params=(account_id, token),
                                  ctx=(client, account_id, token),
                                  finish=self.VerifyTokenFinish)
     self.__redispool.putCmd(cmd)
Ejemplo n.º 2
0
 def UpdateLoginServerTimes(self, id, value):
     cmd = redispool.RedisCommand(index=self.HashIndex(time.time()),
                                  func=self.UpdateLoginServerTimesFunc,
                                  params=(id, value),
                                  ctx=(),
                                  finish=self.UpdateLoginServerTimesFinish)
     self.__redispool.putCmd(cmd)
Ejemplo n.º 3
0
 def LoadLoginServerList(self):
     cmd = redispool.RedisCommand(index=self.HashIndex(time.time()),
                                  func=self.LoadLoginServerListFunc,
                                  params=(),
                                  ctx=(),
                                  finish=self.LoadLoginServerListFinish)
     self.__redispool.putCmd(cmd)
Ejemplo n.º 4
0
 def RemoveLoginServer(self):
     if self.loginserver_id:
         cmd = redispool.RedisCommand(index=self.HashIndex(time.time()),
                                      func=self.RemoveLoginServerFunc,
                                      params=(self.loginserver_id),
                                      ctx=(self.loginserver_id, ),
                                      finish=self.RemoveLoginServerFinish)
         self.__redispool.putCmd(cmd)
Ejemplo n.º 5
0
 def UpdateLoginServerExpireTime(self):
     cmd = redispool.RedisCommand(
         index=self.HashIndex(time.time()),
         func=self.UpdateLoginServerExpireTimeFunc,
         params=(self.loginserver_id, self.loginserver_ip,
                 self.loginserver_port),
         ctx=(self.loginserver_id, ),
         finish=self.UpdateLoginServerExpireTimeFinish)
     self.__redispool.putCmd(cmd)
Ejemplo n.º 6
0
 def AddLoginServer(self, id, ip, port):
     self.loginserver_id = id
     self.loginserver_ip = ip
     self.loginserver_port = port
     cmd = redispool.RedisCommand(index=self.HashIndex(time.time()),
                                  func=self.AddLoginServerFunc,
                                  params=(id, ip, port),
                                  ctx=(id, ip, port),
                                  finish=self.AddLoginServerFinish)
     self.__redispool.putCmd(cmd)