diff --git a/jobs/import_process/worker.go b/jobs/import_process/worker.go index be09177006..5747d04b93 100644 --- a/jobs/import_process/worker.go +++ b/jobs/import_process/worker.go @@ -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 }