[MM-55595] Use annotated logger in search layer (#25468)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5a4dba8809
Коммит
b2ec1ff8ae
@@ -1216,7 +1216,7 @@ func (a *App) importReplies(rctx request.CTX, data []imports.ReplyImportData, po
|
||||
fileIDs := a.uploadAttachments(rctx, replyData.Attachments, reply, teamID)
|
||||
for _, fileID := range reply.FileIds {
|
||||
if _, ok := fileIDs[fileID]; !ok {
|
||||
a.Srv().Store().FileInfo().PermanentDelete(fileID)
|
||||
a.Srv().Store().FileInfo().PermanentDelete(rctx, fileID)
|
||||
}
|
||||
}
|
||||
reply.FileIds = make([]string, 0)
|
||||
@@ -1519,7 +1519,7 @@ func (a *App) importMultiplePostLines(rctx request.CTX, lines []imports.LineImpo
|
||||
fileIDs := a.uploadAttachments(rctx, line.Post.Attachments, post, team.Id)
|
||||
for _, fileID := range post.FileIds {
|
||||
if _, ok := fileIDs[fileID]; !ok {
|
||||
a.Srv().Store().FileInfo().PermanentDelete(fileID)
|
||||
a.Srv().Store().FileInfo().PermanentDelete(rctx, fileID)
|
||||
}
|
||||
}
|
||||
post.FileIds = make([]string, 0)
|
||||
@@ -1642,7 +1642,7 @@ func (a *App) uploadAttachments(rctx request.CTX, attachments *[]imports.Attachm
|
||||
|
||||
func (a *App) updateFileInfoWithPostId(rctx request.CTX, post *model.Post) {
|
||||
for _, fileID := range post.FileIds {
|
||||
if err := a.Srv().Store().FileInfo().AttachToPost(fileID, post.Id, post.ChannelId, post.UserId); err != nil {
|
||||
if err := a.Srv().Store().FileInfo().AttachToPost(rctx, fileID, post.Id, post.ChannelId, post.UserId); err != nil {
|
||||
rctx.Logger().Error("Error attaching files to post.", mlog.String("post_id", post.Id), mlog.Array("post_file_ids", post.FileIds), mlog.Err(err))
|
||||
}
|
||||
}
|
||||
@@ -1718,7 +1718,7 @@ func (a *App) importDirectChannel(rctx request.CTX, data *imports.DirectChannelI
|
||||
|
||||
if data.Header != nil {
|
||||
channel.Header = *data.Header
|
||||
if _, appErr := a.Srv().Store().Channel().Update(channel); appErr != nil {
|
||||
if _, appErr := a.Srv().Store().Channel().Update(rctx, channel); appErr != nil {
|
||||
return model.NewAppError("BulkImport", "app.import.import_direct_channel.update_header_failed.error", nil, "", http.StatusBadRequest).Wrap(appErr)
|
||||
}
|
||||
}
|
||||
@@ -1832,7 +1832,7 @@ func (a *App) importMultipleDirectPostLines(rctx request.CTX, lines []imports.Li
|
||||
fileIDs := a.uploadAttachments(rctx, line.DirectPost.Attachments, post, "noteam")
|
||||
for _, fileID := range post.FileIds {
|
||||
if _, ok := fileIDs[fileID]; !ok {
|
||||
a.Srv().Store().FileInfo().PermanentDelete(fileID)
|
||||
a.Srv().Store().FileInfo().PermanentDelete(rctx, fileID)
|
||||
}
|
||||
}
|
||||
post.FileIds = make([]string, 0)
|
||||
|
||||
Ссылка в новой задаче
Block a user