Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/refactor_calcom_usage' into refa…
Browse files Browse the repository at this point in the history
…ctor_calcom_usage
  • Loading branch information
adnanalicic committed Feb 28, 2023
2 parents e0e12b2 + d194cdb commit 19c0a4e
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 19c0a4e

Please sign in to comment.