mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
16 lines
247 B
Groovy
16 lines
247 B
Groovy
def call(retryTimes, delaySecs, closure) {
|
|
retry(retryTimes) {
|
|
try {
|
|
closure()
|
|
} catch (ex) {
|
|
sleep delaySecs
|
|
throw ex
|
|
}
|
|
}
|
|
}
|
|
|
|
def call(retryTimes, Closure closure) {
|
|
call(retryTimes, 15, closure)
|
|
}
|
|
|
|
return this
|