mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-12-04 23:31:05 +01:00
28 lines
464 B
Go
28 lines
464 B
Go
|
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() {
|
||
|
util.ConfigInit(configPath)
|
||
|
|
||
|
taskPool := runners.JobPool{}
|
||
|
|
||
|
taskPool.Run()
|
||
|
}
|
||
|
|
||
|
var runnerStartCmd = &cobra.Command{
|
||
|
Use: "start",
|
||
|
Short: "Run in runner mode",
|
||
|
Run: func(cmd *cobra.Command, args []string) {
|
||
|
runRunner()
|
||
|
},
|
||
|
}
|