Skip to content

Commit

Permalink
fix: Fix for incorrect increment of the attempts number
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Kopysov <o.kopysov@samsung.com>
  • Loading branch information
o-kopysov committed Feb 23, 2024
1 parent dfb2b4d commit 8c530ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/lpvs/service/LPVSQueueService.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ public void processWebHook(LPVSQueue webhookConfig) {
pullRequest.setStatus(LPVSPullRequestStatus.INTERNAL_ERROR.toString());
pullRequest = lpvsPullRequestRepository.saveAndFlush(pullRequest);
log.error("Can't authorize commentResults() " + e.getMessage());
int currentAttempts = webhookConfig.getAttempts();
int currentAttempts = webhookConfig.getAttempts() + 1;
if (currentAttempts < maxAttempts) {
webhookConfig.setAttempts(currentAttempts + 1);
webhookConfig.setAttempts(currentAttempts);
try {
addFirst(webhookConfig);
} catch (InterruptedException e1) {
Expand Down

0 comments on commit 8c530ac

Please sign in to comment.