From 73755456b4e1c2d36473a5ddf1060c4b77569b09 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 29 Aug 2022 18:21:44 +0300 Subject: [PATCH] fix: Increase random sleep range in Bitbucket eventsource (#2148) Signed-off-by: Derek Wang --- eventsources/sources/bitbucket/start.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eventsources/sources/bitbucket/start.go b/eventsources/sources/bitbucket/start.go index 469adbe358..5021b4bb78 100644 --- a/eventsources/sources/bitbucket/start.go +++ b/eventsources/sources/bitbucket/start.go @@ -183,7 +183,7 @@ func (el *EventListener) StartListening(ctx context.Context, dispatch func([]byt // When running multiple replicas of the eventsource, they will all try to create the webhook. // Randomly sleep some time to mitigate the issue. - randomNum, _ := rand.Int(rand.Reader, big.NewInt(int64(2000))) + randomNum, _ := rand.Int(rand.Reader, big.NewInt(int64(5000))) time.Sleep(time.Duration(randomNum.Int64()) * time.Millisecond) applyWebhooks()