Skip to content

Commit

Permalink
add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim-Gadalov committed Mar 4, 2024
1 parent 8e3e946 commit c834395
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ private Void sync() {
long now = time();

for (String redisKey : set.valueRange(Double.NEGATIVE_INFINITY, true, now, true, 0, syncBatch)) {
log.info("Redis key from queue {}", redisKey);
sync(redisKey);
}
} catch (Throwable e) {
Expand Down Expand Up @@ -431,6 +432,7 @@ private void redisPut(String key, Result result) {
map.putAll(fields);

if (result.synced) { // cleanup because it is already synced
log.info("RedisPut key removed from queue {}", key);
map.expire(cacheExpiration);
set.remove(key);
}
Expand All @@ -442,6 +444,7 @@ private void redisSync(String key) {
map.expire(cacheExpiration);

RScoredSortedSet<String> set = redis.getScoredSortedSet(REDIS_QUEUE, StringCodec.INSTANCE);
log.info("RedisSync key removed from queue {}", key);
set.remove(key);
}

Expand Down

0 comments on commit c834395

Please sign in to comment.