Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "raid", Short: "The server is used to accept jobs from the rai queue.", SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { defer func() { if com.IsDir(config.App.TempDir) { os.RemoveAll(config.App.TempDir) } }() death := death.NewDeath(syscall.SIGINT, syscall.SIGTERM) options := []server.Option{ server.Stdout(os.Stdout), server.Stderr(os.Stderr), server.NumWorkers(2), } if clientJobQueueName != "" { options = append(options, server.JobQueueName(clientJobQueueName)) } server, err := server.New(options...) if err != nil { return err } if err := server.Connect(); err != nil { return err } if config.IsDebug || config.IsVerbose { death.SetLogger(log) } death.WaitForDeath(server, prof{}) return nil }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.