Questions tagged [retry-logic]

Programming techniques designed to retry operations that failed due to error codes, exceptions, or other language specific means.

377 questions
0
votes
1 answer

Polly Retry is not working and logs are not added for the retry

Currently, I have the code in which the while loop get's stuck when connection.IsConnected = true private bool TryConnect() { if (!connection.IsConnected) { Monitor.Enter(_syncRoot); try { …
finn
  • 31
  • 3
0
votes
1 answer

Google Spreadsheets API (node js) - Adding a retry for error "The service is currently unavailable"

I have a full stack app that takes input from a user and posts the data to a Google Spreadsheet using their API service. The service was working perfectly until a few months ago where one of the requests from a client failed to post and gave us the…
0
votes
0 answers

How to Achieve retry Mechanism in C# MS Framework

we want to implement a functionality which reattempts the execution of failed test scripts. This needs to be implemented at Solution or framework level so functionality is available for all the projects. Following needs to be taken care. 1. If a…
0
votes
1 answer

How to create a PeriodicWorkRequest with retry logic in java for Android WorkManager?

Any way to pass workInfo.getRunAttemptCount() from my MainActivity to the Class extending Worker? So I can track the retry count and repeat for 3 iterations and call a RESULT.failure() state inside doWork() after 3 retries if the request was not…
0
votes
1 answer

How to retry only error-producing line in a function

This is quite tricky to explain, but I'd like to know if there is a way to repeatedly retry only the line of code that produced the error until it works. For example say I have the code: def unreliabelfunction(): #Line 1 of code #Line 2 of…
0
votes
1 answer

Retry Patterns using Polly httpClient ConfigureAwait(true)

var appendFileResponse = await Policy .HandleResult(message => !message.IsSuccessStatusCode) .WaitAndRetryAsync(3, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt))) …
Sky W
  • 1
  • 2
0
votes
1 answer

Resilience4j.retry with exception is not working

I am using resilience4j.retry with resilience4j.circuitbreaker. Service1 is calling another service Service2, which can throw exceptions. Even if I get exceptions, I should try to connect for at least defined no of times waitDuration *…
roottraveller
  • 7,942
  • 7
  • 60
  • 65
0
votes
2 answers

Parallel.ForEach Loop with Retry Logic in C#

I am using Parallel.ForEach to download multiple files in C# from google bucket to folder location. I'm using retry logic so it can retry downloading files in case files download fails during downloading. How can I apply retry logic for each file…
0
votes
1 answer

Is it safe to rely on SqlConnection retry logic while using SqlCommand?

I was using Microsoft.Practice.TransientFaultHandling block for retry logic. Now I switched my application to .Net 4.8 and use the new build in retry logic for SqlConnection. I was wondering if I need a special retry logic for my SqlCommand (I used…
purbsel
  • 307
  • 8
  • 21
0
votes
0 answers

Ansible ssh fails with error: Data could not be sent to remote host

I have an ansible playbook that executes a shell script on remote host "10.8.8.88" as many times as the number files provided as parameter ansible-playbook test.yml -e files="file1,file2,file3,file4" playbook looks like below: - name: Call ssh …
Ashar
  • 2,942
  • 10
  • 58
  • 122
0
votes
1 answer

Hi-Lo Guessing Game - Limiting number of attempts from user input & play again logic

I'm new to Java programming and taking a college course where I have an assignment to create a Hi/Lo guessing game. The game provides up to 5 attempts for the user to input a number between 1 and 100 (inclusive). The program must provide the logic…
0
votes
1 answer

how to capture CircuitState for AsyncCircuitBreakerPolicy

I have a variable asyncPolicy of type IAsyncPolicy which has one or more policy including AsyncCircuitBreakerPolicy. Now I want to get specific policy say AsyncCircuitBreakerPolicy before a API call, so that I can extract the status of Circuit. Is…
user584018
  • 10,186
  • 15
  • 74
  • 160
0
votes
1 answer

error while trying to wrap fallbackForCircuitBreaker with asyncPolicy

I have IAsyncPolicy which is a wrapper of 2 policies timeoutPolicy and waitAndRetryPolicy which I'm returning with a variable asyncPolicy. Now I have another policy fallbackForCircuitBreaker which I want to wrap with…
user584018
  • 10,186
  • 15
  • 74
  • 160
0
votes
0 answers

How to attempt a retry of AWS lambda from within my service?

new to backend development. I have a service that executes a step function which is essentially a countdown timer step function that triggers a lambda. This lambda takes a url from the step function to hit my service's endpoint. In the event that my…
0
votes
1 answer

Informatica BDM - How to re-try "REST Web Service Consumer"?

I have an Informatica BDM system (note Big Data Management, not Power Centre) and am having a problem with dropping connections when communicating with a third party web service. This fails the REST web service transformation which in turn kills our…
user2800708
  • 1,890
  • 2
  • 18
  • 31