Skip to content

Commit

Permalink
Update RedisDiaryPublisher.java
Browse files Browse the repository at this point in the history
hyukjinKimm authored Jul 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 7cce911 commit f280620
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ public void publishDiaryMessage(DiaryMessage message) {
String expiryKey = "diaryMessage_expiry:"+message.userId();
String serializedMessage = serializaeMessageToString(message);
redisTemplate.opsForValue().set(key,serializedMessage);
redisTemplate.opsForValue().set(expiryKey,"", 25, TimeUnit.SECONDS);
redisTemplate.opsForValue().set(expiryKey,"", 1, TimeUnit.SECONDS);
}

@Override
@@ -44,7 +44,7 @@ public void publishInitialDiaryMessage(DiaryMessage message) {
String expiryKey = "diaryMessage_expiry:"+message.userId();
String serializedMessage = serializaeMessageToString(message);
redisTemplate.opsForValue().set(key,serializedMessage);
redisTemplate.opsForValue().set(expiryKey,"", 25,TimeUnit.SECONDS);
redisTemplate.opsForValue().set(expiryKey,"", 1,TimeUnit.SECONDS);
}

@Override

0 comments on commit f280620

Please sign in to comment.