Questions tagged [retrywhen]
59 questions
1
vote
1 answer
angular 7: how to unit test retries on an http interceptor
I've got an HTTP interceptor that is used for adding headers (authentication) and for performing logging when an error happens. Currently, it uses a custom retry strategy which will try to call the web service 3 times before generating an error.…

Luis Abreu
- 4,008
- 9
- 34
- 63
1
vote
1 answer
RxJava's retryWhen operator
I'm trying to understand retryWhen operator in depth and I have some code as below.
Flowable.just(1, 2, 3, 4, 5)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.retryWhen { throwable…

Berry Huang
- 23
- 1
- 4
1
vote
2 answers
Rxjava - How to retry call after doOnError completes
I`m struggling to retry my rxjava Single call after another network call is done in doOnError:
restApi.getStuff()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnError {
…

bleo
- 219
- 2
- 8
0
votes
1 answer
In rxjs, which operator should I put instead of retryWhen that uses bufferWhen?
I used retryWhen with the bufferWhen operator in my code. But retryWhen is deprecated. Which operator can I use instead of retryWhen?
This is my code:
of(1)
.pipe(
tap(() => {
if (this.webBusy) {
throw 2;
…

Hamid Taebi
- 357
- 2
- 12
0
votes
2 answers
Spring @Retryable vs WebFlux retry
Could somebody help with understanding the difference between using @Retryable on metod which contains WebFlux client call and retries that are supported by WebFlux itself (e.g. retryWhen)?

MainS
- 120
- 1
- 6
0
votes
2 answers
How to verify number of invocations, in the project reactor for retryWhen
I have the following function
public Mono revertChange() { someService.someMethod() .retryWhen(3 times, with 150millis of delay, if specific error occured) .onError(e -> log_the_error); }
And I have a simple unit test that summpose to…

Timur Atakishiev
- 1
- 2
0
votes
0 answers
Gitlab CI retry failed job automatically
I need to configure a gitlab ci job to be re-executed when it fails. More specifically the deploy job. I set up the job with a retry value and tried to force it to fail to test it. But I couldn't achieve the job start again. Here an example of what…

Julio Romero
- 1
- 1
0
votes
1 answer
How to update the source when use retrywhen RxJs
I'm doing a request to an API to create an order, it's probably got an error when trying to create the order with the same code because the method generateCode() is a random generator!
When performing retries, it uses the same source, which means,…

Jorge Puerta
- 3
- 2
0
votes
1 answer
RxJava - use retryWhen on parent Observable of the error Observable
my service is working with couchbase.
when I want to update a document, first the service performs a lookup and gets the document with CAS, and then it updates the document.
if the update failed with CASMismatch exception I want to perform retry…

Etay Ceder
- 160
- 1
- 9
0
votes
2 answers
Retry, then ignore error and get source value rxjs
Error or no error, I want to get into the subscribe success handler after retrying. To test, comment out the setTimeout line. This will make it so that checkforText$ always throws an error. I want to ignore the final error, and still return the…

Spankied
- 1,626
- 13
- 21
0
votes
1 answer
RXJava repeat request if response is not successful and continue stream
I need to make a request to a webserver and the server usually returns a reference code that i use in the stream. But sometimes the server is busy and returns an error indicating that it's busy so that i have to retry in a few moments.
public static…

Aldridge1991
- 1,326
- 6
- 24
- 51
0
votes
2 answers
RxJava's retryWhen unexpectedly keeps retrying forever
Can anyone …
explain why the following code keeps retrying indefinitely, once retryWhen is called?
correct the code to stop retrying when Random.nextBoolean()
returns true?
I think there is a 50% chance that retryWhen is called because of…

Tatsuya Fujisaki
- 1,434
- 15
- 18
0
votes
1 answer
catchError not getting called after retryWhen
I'm kinda new with Rxjs. and what I'm trying to do is call an API 5 times, but return a custom error value to my component if after 5 times the request still fails. But somehow it doesn't reach the catchError.
start(): Observable {
…
0
votes
1 answer
Rate limiting on top of WebFlux retry
Rate limiting on top of WebFlux retry
I want to limit the number of retires from WebFlux. The use case is that if the service to be invoked goes down then i end up retrying for all read timeouts which in-turn creates double the load.
I figured out a…

Nitin Saxena
- 19
- 3
0
votes
2 answers
python selenium webscraping. How to keep retrying when network is down or the scraped website is slow?
I am trying to scrape a table from web using selenium in python. But the website is very slow and there are many network issues most of the time. So I would like the code to keep trying even if the website takes time to load. I have to scrape 941…

adc admin
- 23
- 10