updated code structure

This commit is contained in:
marvzhang
2021-04-29 10:44:46 +08:00
parent 820334753a
commit fd0f6fc37a
12 changed files with 192 additions and 80 deletions

View File

@@ -10,13 +10,13 @@ func init() {
}
var handlerCmd = &cobra.Command{
Use: "handler",
Short: "Start task handler",
Long: `Start task handler service (worker) of Crawlab
which runs tasks assigned by master node`,
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()
handler.Init()
handler.Run()
apps.Start(handler)
},
}