Changing timeouts to be more reasonable in sample client
This commit is contained in:
parent
917bdca354
commit
494f733f4e
2 changed files with 4 additions and 4 deletions
|
@ -125,7 +125,7 @@ func main() {
|
|||
fmt.Println(resp.String())
|
||||
|
||||
if(resp.ResponseCode == aurora.ResponseCode_OK) {
|
||||
if(!monitor.Instances(job.JobKey(), job.GetInstanceCount(), 5, 10)) {
|
||||
if(!monitor.Instances(job.JobKey(), job.GetInstanceCount(), 5, 50)) {
|
||||
_, err := r.KillJob(job.JobKey())
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
@ -144,7 +144,7 @@ func main() {
|
|||
}
|
||||
|
||||
if(resp.ResponseCode == aurora.ResponseCode_OK) {
|
||||
if(!monitor.Instances(job.JobKey(), 0, 5, 10)) {
|
||||
if(!monitor.Instances(job.JobKey(), 0, 5, 50)) {
|
||||
fmt.Println("Unable to kill all instances of job")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ func main() {
|
|||
}
|
||||
|
||||
if(resp.ResponseCode == aurora.ResponseCode_OK) {
|
||||
if(!monitor.Instances(job.JobKey(), job.GetInstanceCount()+numOfInstances, 5, 10)) {
|
||||
if(!monitor.Instances(job.JobKey(), job.GetInstanceCount()+numOfInstances, 5, 50)) {
|
||||
fmt.Println("Flexing up failed")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ func (m *Monitor) JobUpdate(updateKey aurora.JobUpdateKey, interval int, timeout
|
|||
|
||||
func (m *Monitor) Instances(key *aurora.JobKey, instances int32, interval int, timeout int) bool {
|
||||
|
||||
for i := 0; i*interval <= timeout; i++ {
|
||||
for i := 0; i*interval < timeout; i++ {
|
||||
|
||||
live, err := m.Client.GetInstanceIds(key, aurora.LIVE_STATES)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue