check for staus failed and return error

This commit is contained in:
Mothiki 2017-08-21 19:45:36 -07:00
parent 211319238e
commit 7e578f80bd

View file

@ -80,9 +80,9 @@ func (m *Monitor) JobUpdate(updateKey aurora.JobUpdateKey, interval int, timeout
if status == aurora.JobUpdateStatus_ROLLED_FORWARD { if status == aurora.JobUpdateStatus_ROLLED_FORWARD {
fmt.Println("Update succeded") fmt.Println("Update succeded")
return true, nil return true, nil
} else { } else if status == aurora.JobUpdateStatus_FAILED {
fmt.Println("Update failed") fmt.Println("Update failed")
return false, nil return false, errors.New("update failed")
} }
} }