Making abort job synchronous (#95)
* Making abort job synchronous to avoid scenarios where kill is received before job update lock is released. * Adding missing cases for terminal update statues to JobUpdate monitor. * Monitors now return errors which provide context through behavior. * Adding notes to the doc explaining what happens when AbortJob times out.
This commit is contained in:
parent
10c620de7b
commit
2b7eb3a852
3 changed files with 66 additions and 32 deletions
13
errors.go
13
errors.go
|
@ -28,6 +28,19 @@ func IsTimeout(err error) bool {
|
|||
return ok && temp.Timedout()
|
||||
}
|
||||
|
||||
type timeoutErr struct {
|
||||
error
|
||||
timedout bool
|
||||
}
|
||||
|
||||
func (r *timeoutErr) Timedout() bool {
|
||||
return r.timedout
|
||||
}
|
||||
|
||||
func newTimedoutError(err error) *timeoutErr {
|
||||
return &timeoutErr{error: err, timedout: true}
|
||||
}
|
||||
|
||||
// retryErr is a superset of timeout which includes extra context
|
||||
// with regards to our retry mechanism. This is done in order to make sure
|
||||
// that our retry mechanism works as expected through our tests and should
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue