Fixes MM-50733 (#22784)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0af69b3411
Коммит
7325c38c39
@@ -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
|
||||
|
||||
Ссылка в новой задаче
Block a user