From e7fb52d1811e84e3da4d09b04a88dd7a4fb8e0f9 Mon Sep 17 00:00:00 2001 From: tkuzynow Date: Tue, 28 Feb 2023 10:55:30 +0100 Subject: [PATCH] fix: increase timeout to be consistent with previous implementation --- .../api/service/onlineberatung/MessagesService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/vi/appointmentservice/api/service/onlineberatung/MessagesService.java b/src/main/java/com/vi/appointmentservice/api/service/onlineberatung/MessagesService.java index 67ea012..2a5de64 100644 --- a/src/main/java/com/vi/appointmentservice/api/service/onlineberatung/MessagesService.java +++ b/src/main/java/com/vi/appointmentservice/api/service/onlineberatung/MessagesService.java @@ -73,16 +73,14 @@ public void publishCancellationMessage(String bookingUid) { @Async public void publishNewAppointmentMessage(Long bookingId) { - - new BookingCreationRepeater(5).tryRepeatCreateMessage(bookingId).orElseLogError(); - + new BookingCreationRepeater(10).tryRepeatCreateMessage(bookingId).orElseLogError(); } @Data class BookingCreationRepeater { int attemptsLeft; - public static final int INTERVAL_BETWEEN_CALLS = 1000; + private static final int INTERVAL_BETWEEN_CALLS = 2000; public BookingCreationRepeater(int maxAttempts) { attemptsLeft = maxAttempts;