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

Add delay before performing async call #143

Open
Mbuckley0 opened this issue Mar 10, 2021 · 4 comments
Open

Add delay before performing async call #143

Mbuckley0 opened this issue Mar 10, 2021 · 4 comments

Comments

@Mbuckley0
Copy link
Contributor

I'd like to set something up similar to the retry_delay so that I can wait a few seconds before certain asynchronous calls are made. My example use case is that I have a dashboard which has some fairly database intensive queries in it. I'd like to do async calls for all of the elements visible at the top of the page first so that they come in faster and then a second or so later it will perform the calls for the other elements.

@nikolalsvk
Copy link
Collaborator

Thanks for the idea, @Mbuckley0. I believe this would an interesting feature for other users. Did you try to implement something yourself already?

@Mbuckley0
Copy link
Contributor Author

Not yet. It should be pretty easy to implement using setTimeout. I'm happy to add it in and create a PR for it.

@nikolalsvk
Copy link
Collaborator

Sure, let's add it and see how it looks, thank you

@pastullo
Copy link

Hey guys, looking for exactly this. The idea is to load a bunch of orders and for each order call an async render with a staggered delay, to avoid having all the partial to be fired at once. For example i'd like to load each partial with a 100ms delay.

Has anyone already tried this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants