support queue
This commit is contained in:
18
cmd_queue.go
Normal file
18
cmd_queue.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package atom
|
||||
|
||||
import (
|
||||
"github.com/rogeecn/atom-addons/services/queue"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func withQueueCommand(rootCmd *cobra.Command) *cobra.Command {
|
||||
queueCmd := &cobra.Command{
|
||||
Use: "queue",
|
||||
Short: "queue consumer",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return queue.Serve()
|
||||
},
|
||||
}
|
||||
rootCmd.AddCommand(queueCmd)
|
||||
return rootCmd
|
||||
}
|
||||
Reference in New Issue
Block a user