Skip to content

Commit

Permalink
fixed retry timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Xin Zheng committed Jan 11, 2024
1 parent 30a2424 commit bd196ef
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/org/swisspush/redisques/RedisQues.java
Original file line number Diff line number Diff line change
Expand Up @@ -691,13 +691,17 @@ private void processMessageWithTimeout(final String queue, final String payload,
boolean success;
if (reply.succeeded()) {
success = OK.equals(reply.result().body().getString(STATUS));
dequeueStatistic.get(queue).lastDequeueSuccessTimestamp = System.currentTimeMillis();
dequeueStatistic.get(queue).nextDequeueDueTimestamp = null;
if (success) {
dequeueStatistic.get(queue).lastDequeueSuccessTimestamp = System.currentTimeMillis();
dequeueStatistic.get(queue).nextDequeueDueTimestamp = null;
}
} else {
log.info("RedisQues QUEUE_ERROR: Consumer failed {} queue: {}",
uid, queue, new Exception(reply.cause()));
success = Boolean.FALSE;
}


handler.handle(success);
});
updateTimestamp(queue, null);
Expand Down

0 comments on commit bd196ef

Please sign in to comment.