Migrate emojiStore to use request.CTX instead of context.Context (#24514)

* migrate emojistore to request.ctx

* use mlog.CreateConsoleTestLogger

* Add comment to WithMaster and RequestContextWithMaster
Этот коммит содержится в:
Felipe Martin
2023-09-11 17:07:29 +02:00
коммит произвёл GitHub
родитель e9cc03c1c8
Коммит f65dad83bb
25 изменённых файлов: 233 добавлений и 194 удалений

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

@@ -3139,7 +3139,7 @@ func (s *TimerLayerEmojiStore) Delete(emoji *model.Emoji, timestamp int64) error
return err
}
func (s *TimerLayerEmojiStore) Get(ctx context.Context, id string, allowFromCache bool) (*model.Emoji, error) {
func (s *TimerLayerEmojiStore) Get(ctx request.CTX, id string, allowFromCache bool) (*model.Emoji, error) {
start := time.Now()
result, err := s.EmojiStore.Get(ctx, id, allowFromCache)
@@ -3155,7 +3155,7 @@ func (s *TimerLayerEmojiStore) Get(ctx context.Context, id string, allowFromCach
return result, err
}
func (s *TimerLayerEmojiStore) GetByName(ctx context.Context, name string, allowFromCache bool) (*model.Emoji, error) {
func (s *TimerLayerEmojiStore) GetByName(ctx request.CTX, name string, allowFromCache bool) (*model.Emoji, error) {
start := time.Now()
result, err := s.EmojiStore.GetByName(ctx, name, allowFromCache)
@@ -3187,7 +3187,7 @@ func (s *TimerLayerEmojiStore) GetList(offset int, limit int, sort string) ([]*m
return result, err
}
func (s *TimerLayerEmojiStore) GetMultipleByName(ctx context.Context, names []string) ([]*model.Emoji, error) {
func (s *TimerLayerEmojiStore) GetMultipleByName(ctx request.CTX, names []string) ([]*model.Emoji, error) {
start := time.Now()
result, err := s.EmojiStore.GetMultipleByName(ctx, names)