MM-31612 Optimize bulk import process by avoiding writing zip to disk (#17659)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
72c86448b9
Коммит
fe94a20ce7
@@ -150,7 +150,7 @@ func bulkImportCmdF(command *cobra.Command, args []string) error {
|
||||
|
||||
CommandPrettyPrintln("")
|
||||
|
||||
if err, lineNumber := a.BulkImportWithPath(&request.Context{}, fileReader, !apply, workers, importPath); err != nil {
|
||||
if err, lineNumber := a.BulkImportWithPath(&request.Context{}, fileReader, nil, !apply, workers, importPath); err != nil {
|
||||
CommandPrintErrorln(err.Error())
|
||||
if lineNumber != 0 {
|
||||
CommandPrintErrorln(fmt.Sprintf("Error occurred on data file line %v", lineNumber))
|
||||
|
||||
@@ -374,7 +374,8 @@ func sampleDataCmdF(command *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
var importErr *model.AppError
|
||||
importErr, lineNumber := a.BulkImport(&request.Context{}, bulkFile, false, workers)
|
||||
|
||||
importErr, lineNumber := a.BulkImport(&request.Context{}, bulkFile, nil, false, workers)
|
||||
if importErr != nil {
|
||||
return fmt.Errorf("%s: %s, %s (line: %d)", importErr.Where, importErr.Message, importErr.DetailedError, lineNumber)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user