move wakeup subcommand into signal subcommand and add reset subcommand

This commit is contained in:
Christian Schwarz
2018-10-12 20:50:30 +02:00
parent 025fbda984
commit 89e0103abd
6 changed files with 92 additions and 13 deletions
+5 -5
View File
@@ -29,15 +29,15 @@ var daemonCmd = &cobra.Command{
},
}
var wakeupCmd = &cobra.Command{
Use: "wakeup JOB",
Short: "trigger replication and subsequent pruning for a job",
var signalCmd = &cobra.Command{
Use: "signal [wakeup|reset] JOB",
Short: "wake up a job from wait state or abort its current invocation",
RunE: func(cmd *cobra.Command, args []string) error {
conf, err := config.ParseConfig(rootArgs.configFile)
if err != nil {
return err
}
return client.RunWakeup(conf, args)
return client.RunSignal(conf, args)
},
}
@@ -153,7 +153,7 @@ func init() {
//cobra.OnInitialize(initConfig)
rootCmd.PersistentFlags().StringVar(&rootArgs.configFile, "config", "", "config file path")
rootCmd.AddCommand(daemonCmd)
rootCmd.AddCommand(wakeupCmd)
rootCmd.AddCommand(signalCmd)
statusCmd.Flags().BoolVar(&statusCmdFlags.Raw, "raw", false, "dump raw status description from zrepl daemon")
rootCmd.AddCommand(statusCmd)
rootCmd.AddCommand(stdinserverCmd)