Этот коммит содержится в:
Rohitesh Gupta
2023-04-06 01:28:21 +05:30
коммит произвёл GitHub
родитель 0af69b3411
Коммит 7325c38c39
9 изменённых файлов: 130 добавлений и 0 удалений

Просмотреть файл

@@ -6298,6 +6298,27 @@ func (s *RetryLayerOAuthStore) RemoveAuthDataByClientId(clientId string, userId
}
func (s *RetryLayerOAuthStore) RemoveAuthDataByUserId(userId string) error {
tries := 0
for {
err := s.OAuthStore.RemoveAuthDataByUserId(userId)
if err == nil {
return nil
}
if !isRepeatableError(err) {
return err
}
tries++
if tries >= 3 {
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
return err
}
timepkg.Sleep(100 * timepkg.Millisecond)
}
}
func (s *RetryLayerOAuthStore) SaveAccessData(accessData *model.AccessData) (*model.AccessData, error) {
tries := 0