Skip to content

Commit

Permalink
Change to delay 500
Browse files Browse the repository at this point in the history
  • Loading branch information
bifrurcated committed Jan 15, 2024
1 parent a0dc71e commit fa76637
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ public WalletService(WalletRepo walletRepo) {
@Transactional(
isolation = Isolation.SERIALIZABLE,
propagation = Propagation.REQUIRES_NEW)
@Retryable(retryFor = SQLException.class, maxAttempts = 17, backoff = @Backoff(delay = 1000))
@Retryable(retryFor = SQLException.class, maxAttempts = 17, backoff = @Backoff(delay = 500))
public Wallet addAmount(UUID id, Float amount) {
var wallet = walletRepo.findById(id).orElseThrow(WalletNotFoundError::new);
wallet.setAmount(wallet.getAmount() + amount);
Wallet save = walletRepo.save(wallet);
return save;
return walletRepo.save(wallet);
}

@Transactional
Expand Down

0 comments on commit fa76637

Please sign in to comment.