예제 #1
0
 def size(self):
     return RedisUtils.llen(USER_REQ_QUEUE_NAME)
예제 #2
0
 def push(self, requestId, request):
     rootLogger.debug(requestId + "UserRequestRedisQueue push:" +
                      str(request))
     RedisUtils.lpush(USER_REQ_QUEUE_NAME, request)
예제 #3
0
 def pull(self, requestId):
     request = RedisUtils.blpop(USER_REQ_QUEUE_NAME)
     rootLogger.debug(requestId + "UserRequestRedisQueue pull:" +
                      str(request))
     return self.convertStr2Dict(request)
예제 #4
0
 def get(self, requestId, userId):
     if RedisUtils.exists(userId) is True:
         userInfo = self.__userInfoMap[userId]
         RedisUtils.set(userId, userInfo)
         rootLogger.debug(requestId + "UserRedisCache get:" + str(userInfo))
     return userInfo
예제 #5
0
 def exists(self, userId):
     if RedisUtils.exists(userId) is False:
         exists = False
     else:
         exists = True
     return exists
예제 #6
0
 def push(self, requestId, response):
     rootLogger.debug(requestId + "UserResponseRedisQueue push:" +
                      str(response))
     RedisUtils.lpush(USER_RESP_QUEUE_NAME, response)
예제 #7
0
 def put(self, requestId, userId, userInfo):
     if RedisUtils.exists(userId) is False:
         RedisUtils.set(userId, userInfo)
         rootLogger.debug(requestId + "UserRedisCache put:" + str(userInfo))
         return True
     return False
예제 #8
0
 def size(self):
     return RedisUtils.llen(FOLLOWER_RESP_QUEUE_NAME)
예제 #9
0
 def pull(self, requestId):
     response = RedisUtils.blpop(FOLLOWER_RESP_QUEUE_NAME)
     rootLogger.debug(requestId + "FollowerResponseRedisQueue pull:" +
                      str(response))
     return self.convertStr2Dict(response)
예제 #10
0
 def size(self):
     return RedisUtils.llen(USER_DUPLICATE_QUEUE_NAME)
예제 #11
0
 def pull(self, requestId):
     message = RedisUtils.blpop(USER_DUPLICATE_QUEUE_NAME)
     rootLogger.debug(requestId + "UserDuplicateRedisQueue pull:" +
                      str(message))
     return self.convertStr2Dict(message)
예제 #12
0
 def push(self, requestId, message):
     rootLogger.debug(requestId + "UserDuplicateRedisQueue push:" +
                      str(message))
     RedisUtils.lpush(USER_DUPLICATE_QUEUE_NAME, message)