diff --git a/src/main/java/org/sopt/gptapi/listener/RedisMessageListener.java b/src/main/java/org/sopt/gptapi/listener/RedisMessageListener.java index c00abdd..42c96ee 100644 --- a/src/main/java/org/sopt/gptapi/listener/RedisMessageListener.java +++ b/src/main/java/org/sopt/gptapi/listener/RedisMessageListener.java @@ -29,10 +29,12 @@ public class RedisMessageListener implements MessageListener { public void onMessage(Message message, byte[] pattern) { String expiredKey = new String(message.getBody()); log.info("########## listen succeed ##########"); - Long diaryId = Long.parseLong(expiredKey.split(":")[1]); + + long diaryId = Long.parseLong(expiredKey.split(":")[1]); + log.info("expiredKey : {}", diaryId); String lockKey = "lock:" + expiredKey; - if (redisLockService.tryLock(lockKey, 10, TimeUnit.SECONDS)) { + if (redisLockService.tryLock(lockKey, 30, TimeUnit.SECONDS)) { try { String nonExpiredKey = MESSAGE_KEY_PREFIX + diaryId; String value = redisTemplate.opsForValue().get(nonExpiredKey);