Retry mechanism
Closed this issue · 3 comments
tsiq-karold commented
Sometimes we need to invoke external services which might require retries. Would be great to have webtau support this natively so that reports can differentiate retries from multiple invocations of the same thing.
Proposed syntax:
def something = withRetry {
http.get(...) {
return foobar
}
}
The withRetry
method could take the following arguments (all optional other than the closure):
- max retries
- wait between retries
- closure
tsiq-clemens commented
A backend-suggested delay as described in https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After can / should be honored .
MykolaGolubyev commented
That is a good idea and a tricky one. RetryStep should not be specific to http.
MykolaGolubyev commented
@tsiq-clemens did you have any luck implementing it based on repeated step concept?