Initialize the logger for imports (#20978)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5211d5de15
Коммит
78251a3ff1
@@ -17,6 +17,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/v6/model"
|
||||
"github.com/mattermost/mattermost-server/v6/services/configservice"
|
||||
"github.com/mattermost/mattermost-server/v6/shared/filestore"
|
||||
"github.com/mattermost/mattermost-server/v6/shared/mlog"
|
||||
)
|
||||
|
||||
const jobName = "ImportProcess"
|
||||
@@ -28,10 +29,11 @@ type AppIface interface {
|
||||
FileSize(path string) (int64, *model.AppError)
|
||||
FileReader(path string) (filestore.ReadCloseSeeker, *model.AppError)
|
||||
BulkImportWithPath(c *request.Context, jsonlReader io.Reader, attachmentsReader *zip.Reader, dryRun bool, workers int, importPath string) (*model.AppError, int)
|
||||
Log() *mlog.Logger
|
||||
}
|
||||
|
||||
func MakeWorker(jobServer *jobs.JobServer, app AppIface) model.Worker {
|
||||
appContext := request.EmptyContext(nil)
|
||||
appContext := request.EmptyContext(app.Log())
|
||||
isEnabled := func(cfg *model.Config) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user