Fix racy test issues (#24971)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
366d1613b7
Коммит
486e836b83
@@ -796,11 +796,10 @@ func (a *App) UploadFileX(c request.CTX, channelID, name string, input io.Reader
|
||||
|
||||
if *a.Config().FileSettings.ExtractContent {
|
||||
infoCopy := *t.fileinfo
|
||||
crctx := c.Clone()
|
||||
a.Srv().GoBuffered(func() {
|
||||
err := a.ExtractContentFromFileInfo(crctx, &infoCopy)
|
||||
err := a.ExtractContentFromFileInfo(c, &infoCopy)
|
||||
if err != nil {
|
||||
crctx.Logger().Error("Failed to extract file content", mlog.Err(err), mlog.String("fileInfoId", infoCopy.Id))
|
||||
c.Logger().Error("Failed to extract file content", mlog.Err(err), mlog.String("fileInfoId", infoCopy.Id))
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1048,11 +1047,10 @@ func (a *App) DoUploadFileExpectModification(c request.CTX, now time.Time, rawTe
|
||||
|
||||
if *a.Config().FileSettings.ExtractContent {
|
||||
infoCopy := *info
|
||||
crctx := c.Clone()
|
||||
a.Srv().GoBuffered(func() {
|
||||
err := a.ExtractContentFromFileInfo(crctx, &infoCopy)
|
||||
err := a.ExtractContentFromFileInfo(c, &infoCopy)
|
||||
if err != nil {
|
||||
crctx.Logger().Error("Failed to extract file content", mlog.Err(err), mlog.String("fileInfoId", infoCopy.Id))
|
||||
c.Logger().Error("Failed to extract file content", mlog.Err(err), mlog.String("fileInfoId", infoCopy.Id))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user