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

fix(api-requestor): bind custom values for max_retry and retry_delay #164

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

dhoko
Copy link
Contributor

@dhoko dhoko commented Jun 14, 2024

👋 I found a small issue while sending translations via the api this afternoon

Changes

  • Bind MAX_RETRY + RETRY_DELAY to the api requestor
  • Update default test
  • Add a test with custom values

My current config:

        return CrowdinClient(
            organization=self.organization, token=self.token, timeout=600, retry_delay=10

Before

INFO:[requester.py] Initiating retry 1 for request post projects/xxx/translations after sleeping 0.1 seconds.

It doesn't use our custom values cf:

retry_delay=0.1 timeout=600 max_retries=5

After

It takes the values we specified cf:

retry_delay=10 timeout=600 max_retries=5

@dhoko dhoko force-pushed the fix/bindings-api-connector branch from c80c441 to 09e3f1e Compare June 14, 2024 15:08
@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.19%. Comparing base (87b58a4) to head (9ca87bd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #164      +/-   ##
==========================================
+ Coverage   99.19%   99.19%   +0.01%     
==========================================
  Files         161      161              
  Lines        6008     6020      +12     
  Branches      824      825       +1     
==========================================
+ Hits         5959     5971      +12     
  Misses         34       34              
  Partials       15       15              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dhoko dhoko force-pushed the fix/bindings-api-connector branch from 09e3f1e to a9303a9 Compare June 14, 2024 15:12
@dhoko dhoko force-pushed the fix/bindings-api-connector branch from a9303a9 to 9ca87bd Compare June 14, 2024 15:17
Copy link
Member

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

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

@dhoko thank you!

@andrii-bodnar andrii-bodnar merged commit 725b7a4 into crowdin:main Jun 17, 2024
7 checks passed
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