Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Adding a delay of 1 sec in retry loops #409

Merged
merged 7 commits into from
Apr 18, 2020
Merged

Conversation

dimpar
Copy link
Contributor

@dimpar dimpar commented Apr 17, 2020

Closes: #395

Adding a short delay interval of 1 sec. upon failure when calculating a signature and signer generation.

- Added for signer generation.
- Added for signature calculation.
@nkuba
Copy link
Member

nkuba commented Apr 17, 2020

In the other PR we're adding yet another step with continue we will need to cover with a changes from this PR: https://github.com/keep-network/keep-ecdsa/pull/412/files#diff-440b0b0f55b1efa66d8a9a49cf4df99eR311

@nkuba
Copy link
Member

nkuba commented Apr 17, 2020

We should consider adding the delay in every retry loop we do continue. An elegant solution would be having exponential backoff proposed by @Shadowfiend (e.g. https://github.com/cenkalti/backoff).

For this PR we could start with a simple 1-second sleeps and TODOs left in the code. Then it could be replaced with the backoff. Issue: #413

nkuba added 3 commits April 18, 2020 11:49
We added retry delay in case any contrac call within signature
publication loop errors.
This change improves redability of the value so at first seight reader
is sure the value is <b>1</b> second.
We want to replace sleep on retries with a solution including a backoff
described in #413
@nkuba
Copy link
Member

nkuba commented Apr 18, 2020

@pdyraga @dimpar I introduced some updates to this PR. I would love to have you guys reviewed this PR.

@pdyraga pdyraga merged commit f68dabb into master Apr 18, 2020
@pdyraga pdyraga deleted the interval-between-retry-loops branch April 18, 2020 18:31
nkuba added a commit that referenced this pull request May 20, 2020
We added retry delay to loops where it's possible to continue the loop
execution in case of an error. The solution is similiar to the one we added
in #409. If loop execution gets an error for any reason, e.g. problems
with connection to the ethereum API the client ended up in a crazy loop
logging huge amount of errors. This causes disk space drain by the log
file.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retries loop is missing time delay
3 participants