2024-03-27 14:43:41 +01:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ansible-semaphore/semaphore/services/runners"
|
|
|
|
"github.com/ansible-semaphore/semaphore/util"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
runnerCmd.AddCommand(runnerStartCmd)
|
|
|
|
}
|
|
|
|
|
|
|
|
func runRunner() {
|
2024-10-13 15:01:38 +02:00
|
|
|
util.ConfigInit(persistentFlags.configPath, persistentFlags.noConfig)
|
2024-03-27 14:43:41 +01:00
|
|
|
|
|
|
|
taskPool := runners.JobPool{}
|
|
|
|
|
|
|
|
taskPool.Run()
|
|
|
|
}
|
|
|
|
|
|
|
|
var runnerStartCmd = &cobra.Command{
|
|
|
|
Use: "start",
|
|
|
|
Short: "Run in runner mode",
|
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
runRunner()
|
|
|
|
},
|
|
|
|
}
|