From 579bc3393675992caefe5a25f5c8ef3cc8288682 Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Tue, 23 Oct 2018 12:54:34 -0700 Subject: [PATCH] Simplifying command since gorealis now handles error case scenarios and we don't care about resp code here. --- cmd/kill.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cmd/kill.go b/cmd/kill.go index 07eb5cb..e8ea3da 100644 --- a/cmd/kill.go +++ b/cmd/kill.go @@ -6,7 +6,6 @@ import ( "os" "github.com/paypal/gorealis" - "github.com/paypal/gorealis/gen-go/apache/aurora" "github.com/spf13/cobra" ) @@ -64,12 +63,11 @@ func killJob(cmd *cobra.Command, args []string) { os.Exit(1) } - if resp.ResponseCode == aurora.ResponseCode_OK { - if ok, err := monitor.Instances(job.JobKey(), 0, 5, 50); !ok || err != nil { - log.Println("Unable to kill all instances of job") - os.Exit(1) - } - } + if ok, err := monitor.Instances(job.JobKey(), 0, 5, 50); !ok || err != nil { + log.Println("Unable to kill all instances of job") + os.Exit(1) + } + fmt.Println(resp.String()) }