Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the retry reqest with a delay time in ethereum offchain worker #372

Closed
yanganto opened this issue Mar 20, 2020 · 2 comments
Closed
Assignees

Comments

@yanganto
Copy link
Contributor

Because most API has a rate limitation, It should be a delay time to do a request.

https://github.com/darwinia-network/darwinia/pull/335/files#diff-1564a4df147ace619ae3e556faf2ff58R143

@AurevoirXavier
Copy link
Member

AurevoirXavier commented Mar 24, 2020

Add sleep for std. #382
Sleep in WASM https://users.rust-lang.org/t/how-to-sleep-in-no-std/39771.

@yanganto
Copy link
Contributor Author

Most of the solution is used the crate web_sys to use the functions ready in the browser, such as fetch, and setTImeoutInterval.

In the blockchain system, we can utilize the worker regularly awake from block producing time slot to retry things. Because the #370 is almost ready, I think this issue does not exist at all.

boundless-forest pushed a commit that referenced this issue Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants