コード例 #1
0
 def lpush(redisKey, data):
     try:
         redisConn = APBase.getRedisConnection(APBase.REDSI_POOL)
         redisConn.lpush(redisKey, data)
         redisConn = None
     except:
         return False
コード例 #2
0
 def delete(redisKey):
     try:
         redisConn = APBase.getRedisConnection(APBase.REDSI_POOL)
         redisConn.delete(redisKey)
         redisConn = None
     except:
         return False
コード例 #3
0
 def rpop(redisKey):
     try:
         redisConn = APBase.getRedisConnection(APBase.REDSI_POOL)
         data = redisConn.rpop(redisKey)
         redisConn = None
         return data
     except:
         return False
コード例 #4
0
 def get(redisKey):
     try:
         redisConn = APBase.getRedisConnection(APBase.REDSI_POOL)
         result = redisConn.get(redisKey)
         redisConn = None
         return result
     except:
         return False
コード例 #5
0
 def set(redisKey, value):
     try:
         redisConn = APBase.getRedisConnection(APBase.REDSI_POOL)
         redisConn.set(redisKey, value)
         redisConn.expire(redisKey, 300)
         redisConn = None
     except:
         return False