gorealis resiliency
This commit is contained in:
parent
d97e59b9e6
commit
3add32a585
3 changed files with 367 additions and 114 deletions
12
monitors.go
12
monitors.go
|
@ -59,7 +59,7 @@ func (m *Monitor) JobUpdate(updateKey aurora.JobUpdateKey, interval int, timeout
|
|||
fmt.Println("error in ReestablishConn: ", err1)
|
||||
}
|
||||
}
|
||||
|
||||
// if error remains then return (false, err).
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
@ -114,10 +114,14 @@ func (m *Monitor) Instances(key *aurora.JobKey, instances int32, interval int, t
|
|||
fmt.Println(" live: ", live)
|
||||
break
|
||||
}
|
||||
err1 := m.Client.ReestablishConn()
|
||||
if err1 != nil {
|
||||
fmt.Println("error in ReestablishConn: ", err1)
|
||||
|
||||
if err != nil {
|
||||
err1 := m.Client.ReestablishConn()
|
||||
if err1 != nil {
|
||||
fmt.Println("error in ReestablishConn: ", err1)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//live, err := m.Client.GetInstanceIds(key, aurora.LIVE_STATES)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue