This reverts commit ec88ab4ee9.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4b88bfd5fb
Коммит
077221a940
@@ -1049,11 +1049,11 @@ func (s *RetryLayerChannelStore) GetAll(teamID string) ([]*model.Channel, error)
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) GetAllChannelMemberIdsByChannelId(id string) ([]string, error) {
|
||||
func (s *RetryLayerChannelStore) GetAllChannelMembersById(id string) ([]string, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.ChannelStore.GetAllChannelMemberIdsByChannelId(id)
|
||||
result, err := s.ChannelStore.GetAllChannelMembersById(id)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
@@ -1748,27 +1748,6 @@ func (s *RetryLayerChannelStore) GetMemberForPost(postID string, userID string)
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) GetMemberOnly(ctx context.Context, channelID string, userID string) (*model.ChannelMember, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.ChannelStore.GetMemberOnly(ctx, channelID, userID)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return result, err
|
||||
}
|
||||
timepkg.Sleep(100 * timepkg.Millisecond)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) GetMembers(channelID string, offset int, limit int) (model.ChannelMembers, error) {
|
||||
|
||||
tries := 0
|
||||
|
||||
Ссылка в новой задаче
Block a user