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

Retry requests #83

Merged
merged 10 commits into from
Oct 17, 2024
Merged

Retry requests #83

merged 10 commits into from
Oct 17, 2024

Conversation

Kukant
Copy link
Contributor

@Kukant Kukant commented Oct 11, 2024

No description provided.

@Kukant Kukant requested review from tomasfejfar and odinuv October 11, 2024 11:37
Copy link
Contributor

@tomasfejfar tomasfejfar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see what @odinuv

kbcstorage/retry_requests.py Show resolved Hide resolved
import time
import requests

MAX_RETRIES = 11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 10 retries? That means 17 minutes request if the service is down completely.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have 10 retries in SAPI, do we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tak jsme to rozmotali, jak to je. Zásadní totiž je, že v php clientovi je to konfigurovatelné. Tím pádem tam, kde je to nějaký worker, který běží nekonečně je použitý default nebo i víc. A pak když je to používané někde v rámci requestu, tak je to zkrácené třeba na 3 pokusy. Tak prosím tady stejně. Tj. konfigurovatelné parametrem konstruktoru jako v té PHP verzi.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hotovson

@tomasfejfar
Copy link
Contributor

Also, while you're at it, please replace docker-compose with docker compose in the repo. The build is failing because of that.

Copy link
Contributor

@tomasfejfar tomasfejfar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now, it will be battle tested when you use it :)

tests/mocks/test_retry.py Show resolved Hide resolved
@tomasfejfar tomasfejfar merged commit c67dd40 into master Oct 17, 2024
6 checks passed
@tomasfejfar tomasfejfar deleted the feature-retry-request branch October 17, 2024 12:29
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 this pull request may close these issues.

3 participants