Question. Is it possible to change the delay time between retrys?
Open
- Dominant language
- Objective-C
- Stars
- 3.8k
- Forks
- 316
- PR merge metrics
- No merged PRs in 30d
Description
Not an issue. Just a question. Is it possible to change the delay time between promise retrys? I would like to implement the Exponential Backoff and Retry Pattern with different time intervals. This is what I have so far
public static func genericRequestWithRetry(with api: EndPoint) -> Promise {
let customQueue = DispatchQueue(label: "GenericRequestQueue", qos: .userInitiated)
return retry(on: customQueue, attempts: 3, delay: 2, condition: { remainingAttempts, error in
// here I would like to change the delay value and then retry
}
) {
genericRequest(with: api)
}
}
Contributor guide
Assessment
This issue has not been assessed yet.