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

DELAY attribute specifically for retries #80

Closed
abmyii opened this issue Dec 31, 2019 · 13 comments · Fixed by #81
Closed

DELAY attribute specifically for retries #80

abmyii opened this issue Dec 31, 2019 · 13 comments · Fixed by #81

Comments

@abmyii
Copy link
Contributor

abmyii commented Dec 31, 2019

I assumed the DELAY attr would set the delay for retries but instead it applies to all requests. I would appreciate it if there was a DELAY attr specifically for retries (RETRY_DELAY). I'd be happy to implement it if given the go-ahead.

Thank you for this great library!

@howie6879
Copy link
Owner

Hi @abmyii
Did you mean setting a specific delay configuration during the retry process?

@abmyii
Copy link
Contributor Author

abmyii commented Jan 1, 2020

Yes - but one that applies only for retries - not for all requests.

@howie6879
Copy link
Owner

howie6879 commented Jan 1, 2020 via email

@abmyii
Copy link
Contributor Author

abmyii commented Jan 1, 2020

How would I go about doing that?

@howie6879
Copy link
Owner

howie6879 commented Jan 1, 2020 via email

@abmyii
Copy link
Contributor Author

abmyii commented Jan 1, 2020

Here is a rough explanation:

request 1 (fails) -> wait for <x> seconds then retry -> request 2 (fails) -> repeat until request passes

But only for that request - the rest of the concurrent requests should continue like normal - with no timeout.

@howie6879
Copy link
Owner

howie6879 commented Jan 1, 2020 via email

@abmyii
Copy link
Contributor Author

abmyii commented Jan 1, 2020

Yes. Can this be changed so that there is a delay only for retries (gives the server a chance to serve the page requested - i.e. if not cached already) so that the requests that get an immediate response aren't slowed down?

I might make a quick implementation to show what I mean. Will that help?

@howie6879
Copy link
Owner

howie6879 commented Jan 1, 2020 via email

@abmyii
Copy link
Contributor Author

abmyii commented Jan 1, 2020

Done:
master...abmyii:retry_delay

@howie6879
Copy link
Owner

howie6879 commented Jan 1, 2020 via email

@abmyii
Copy link
Contributor Author

abmyii commented Jan 1, 2020

Sure. I think the delay should be inside if self.retry_times > 0:, correct?
Also, thank you very much for taking the time to discuss this!

@howie6879
Copy link
Owner

howie6879 commented Jan 1, 2020 via email

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

Successfully merging a pull request may close this issue.

2 participants