mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
23 lines
415 B
Go
23 lines
415 B
Go
package cmd
|
|
|
|
import (
|
|
"crawlab/apps"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(handlerCmd)
|
|
}
|
|
|
|
var handlerCmd = &cobra.Command{
|
|
Use: "handler",
|
|
Aliases: []string{"H"},
|
|
Short: "Start handler",
|
|
Long: `Start a handler instance of Crawlab
|
|
which runs tasks with given parameters`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
handler := apps.NewHandler()
|
|
apps.Start(handler)
|
|
},
|
|
}
|