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 удалений

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

@@ -3829,7 +3829,7 @@ func (s *RetryLayerEmojiStore) Delete(emoji *model.Emoji, timestamp int64) error
}
func (s *RetryLayerEmojiStore) Get(ctx context.Context, id string, allowFromCache bool) (*model.Emoji, error) {
func (s *RetryLayerEmojiStore) Get(ctx request.CTX, id string, allowFromCache bool) (*model.Emoji, error) {
tries := 0
for {
@@ -3850,7 +3850,7 @@ func (s *RetryLayerEmojiStore) Get(ctx context.Context, id string, allowFromCach
}
func (s *RetryLayerEmojiStore) GetByName(ctx context.Context, name string, allowFromCache bool) (*model.Emoji, error) {
func (s *RetryLayerEmojiStore) GetByName(ctx request.CTX, name string, allowFromCache bool) (*model.Emoji, error) {
tries := 0
for {
@@ -3892,7 +3892,7 @@ func (s *RetryLayerEmojiStore) GetList(offset int, limit int, sort string) ([]*m
}
func (s *RetryLayerEmojiStore) GetMultipleByName(ctx context.Context, names []string) ([]*model.Emoji, error) {
func (s *RetryLayerEmojiStore) GetMultipleByName(ctx request.CTX, names []string) ([]*model.Emoji, error) {
tries := 0
for {