Skip to content

Commit

Permalink
use expentional backoff for retry (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchalef authored Mar 25, 2024
1 parent b3f4b83 commit 03b77fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/store/postgres/userstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ func (dao *UserStoreDAO) Update(
// to the session metadata.
lockRetryPolicy := retrypolicy.Builder[any]().
HandleErrors(models.ErrLockAcquisitionFailed).
WithDelay(200 * time.Millisecond).
WithMaxRetries(3).
WithBackoff(200*time.Millisecond, 10*time.Second).
WithMaxRetries(7).
Build()

lockIDVal, err := failsafe.Get(func() (any, error) {
Expand Down

0 comments on commit 03b77fd

Please sign in to comment.