func runStop(args *docopt.Args, client cluster.Host) error { success := true for _, id := range args.All["ID"].([]string) { if err := client.StopJob(id); err != nil { fmt.Printf("could not stop job %s: %s\n", id, err) success = false continue } fmt.Println(id, "stopped") } if !success { return errors.New("could not stop all jobs") } return nil }
func killJob(app *ct.App, params martini.Params, client cluster.Host, r ResponseHelper) { if err := client.StopJob(params["jobs_id"]); err != nil { r.Error(err) return } }