support queue

This commit is contained in:
yanghao05
2023-06-19 15:12:28 +08:00
parent 6b3bc9d944
commit 3ef841c211
4 changed files with 188 additions and 275 deletions

18
cmd_queue.go Normal file
View 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
}