Remove waitForSidebarCategories (#17004)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
978fee3c20
Коммит
33c8b0ad73
@@ -704,21 +704,21 @@ func (s *RetryLayerChannelStore) CreateDirectChannel(userId *model.User, otherUs
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) CreateInitialSidebarCategories(userId string, teamID string) error {
|
||||
func (s *RetryLayerChannelStore) CreateInitialSidebarCategories(userId string, teamID string) (*model.OrderedSidebarCategories, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
err := s.ChannelStore.CreateInitialSidebarCategories(userId, teamID)
|
||||
result, err := s.ChannelStore.CreateInitialSidebarCategories(userId, teamID)
|
||||
if err == nil {
|
||||
return nil
|
||||
return result, nil
|
||||
}
|
||||
if !isRepeatableError(err) {
|
||||
return err
|
||||
return result, err
|
||||
}
|
||||
tries++
|
||||
if tries >= 3 {
|
||||
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
|
||||
return err
|
||||
return result, err
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user