Skip to content

Commit

Permalink
Use new bulk import flags (#1056)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gabrieljackson authored Jun 6, 2024
1 parent 2571cb0 commit 2fa9199
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/supervisor/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type mmctl struct {
}

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

Expand Down Expand Up @@ -381,7 +381,7 @@ func (s *ImportSupervisor) copyImportToWorkspaceFilestore(imprt *awat.ImportStat
}

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

0 comments on commit 2fa9199

Please sign in to comment.