Skip to content

Commit 582bf6a

Browse files
committed
Add random delay to prevent collisions
1 parent 2f9d8de commit 582bf6a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/pkg/services/phone_service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (service *PhoneService) Upsert(ctx context.Context, params PhoneUpsertParam
8888

8989
ctxLogger := service.tracer.CtxLogger(service.logger, span)
9090

91-
// Add random delay 100ms max to prevent collisions
91+
// Add random delay 100ms max to prevent collisions when updating the phone
9292
randomizer := rand.New(rand.NewSource(time.Now().UnixNano()))
9393
delay := randomizer.Intn(10) * 10
9494
time.Sleep(time.Duration(delay) * time.Millisecond)

0 commit comments

Comments
 (0)