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)
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)
def LoadLoginServerList(self): cmd = redispool.RedisCommand(index=self.HashIndex(time.time()), func=self.LoadLoginServerListFunc, params=(), ctx=(), finish=self.LoadLoginServerListFinish) self.__redispool.putCmd(cmd)
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)
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)
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)