Skip to content

Commit 2fa9199

Browse files
Use new bulk import flags (#1056)
The flag --extract-content=false is used to increase import performance by skipping attachment parsing. The --json flag replaces the old format flag, but behaves the same.
1 parent 2571cb0 commit 2fa9199

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/supervisor/import.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ type mmctl struct {
6969
}
7070

7171
func (m *mmctl) Run(args ...string) ([]byte, error) {
72-
args = append([]string{"--format", "json", "--local"}, args...)
72+
args = append([]string{"--json", "--local"}, args...)
7373
return m.provisioner.ExecMMCTL(m.cluster, m.clusterInstallation, args...)
7474
}
7575

@@ -381,7 +381,7 @@ func (s *ImportSupervisor) copyImportToWorkspaceFilestore(imprt *awat.ImportStat
381381
}
382382

383383
func (s *ImportSupervisor) startImportProcessAndWait(mmctl *mmctl, logger logrus.FieldLogger, importArchiveFilename, awatImportID string) error {
384-
output, err := mmctl.Run("import", "process", importArchiveFilename)
384+
output, err := mmctl.Run("import", "process", "--extract-content=false", importArchiveFilename)
385385
if err != nil {
386386
return errors.Wrap(err, "failed to start import process in Mattermost itself")
387387
}

0 commit comments

Comments
 (0)