11package cmd
22
33import (
4+ "github.com/spf13/cobra"
5+
46 "github.com/qiniu/qshell/v2/docs"
57 "github.com/qiniu/qshell/v2/iqshell"
68 "github.com/qiniu/qshell/v2/iqshell/storage/object/batch"
79 "github.com/qiniu/qshell/v2/iqshell/storage/object/operations"
8- "github.com/spf13/cobra"
910)
1011
1112var batchStatCmdBuilder = func (cfg * iqshell.Config ) * cobra.Command {
@@ -28,6 +29,7 @@ var batchStatCmdBuilder = func(cfg *iqshell.Config) *cobra.Command {
2829 setBatchCmdWorkerCountIncreasePeriodFlags (cmd , & info .BatchInfo )
2930 setBatchCmdSuccessExportFileFlags (cmd , & info .BatchInfo )
3031 setBatchCmdFailExportFileFlags (cmd , & info .BatchInfo )
32+ setBatchCmdResultExportFileFlags (cmd , & info .BatchInfo )
3133 setBatchCmdForceFlags (cmd , & info .BatchInfo )
3234 setBatchCmdEnableRecordFlags (cmd , & info .BatchInfo )
3335 setBatchCmdRecordRedoWhileErrorFlags (cmd , & info .BatchInfo )
@@ -257,6 +259,7 @@ var batchSignCmdBuilder = func(cfg *iqshell.Config) *cobra.Command {
257259 },
258260 }
259261 setBatchCmdInputFileFlags (cmd , & info .BatchInfo )
262+ setBatchCmdResultExportFileFlags (cmd , & info .BatchInfo )
260263 setBatchCmdEnableRecordFlags (cmd , & info .BatchInfo )
261264 setBatchCmdRecordRedoWhileErrorFlags (cmd , & info .BatchInfo )
262265 cmd .Flags ().StringVarP (& info .Deadline , "deadline" , "e" , "3600" , "deadline in seconds, default 3600" )
@@ -340,6 +343,9 @@ func setBatchCmdOverwriteFlags(cmd *cobra.Command, info *batch.Info) {
340343 cmd .Flags ().BoolVarP (& info .Overwrite , "overwrite" , "w" , false , "overwrite mode" )
341344 _ = cmd .Flags ().MarkShorthandDeprecated ("overwrite" , "deprecated and use --overwrite instead" )
342345}
346+ func setBatchCmdResultExportFileFlags (cmd * cobra.Command , info * batch.Info ) {
347+ cmd .Flags ().StringVarP (& info .ResultExportFilePath , "outfile" , "o" , "" , "specifies the file path where the results is saved" )
348+ }
343349
344350func init () {
345351 registerLoader (rsBatchCmdLoader )
0 commit comments