alec-kr / F1PyStats

An open-source Python3 package that provides Formula 1 data to developers.
GNU General Public License v3.0
54 stars 19 forks source link

Retry failed connection #100

Closed youpong closed 1 year ago

youpong commented 1 year ago

Description

Retry failed connection so that make the impact of timeout errors smaller.

Related Issue(s)

None.

User-facing Changes

None.

Screenshots (If necessary)

None.

codecov-commenter commented 1 year ago

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (b4a2c28) compared to base (2ec280a). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #100 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 44 44 Lines 889 892 +3 ========================================= + Hits 889 892 +3 ``` | [Impacted Files](https://codecov.io/gh/alec-kr/F1PyStats/pull/100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [f1pystats/\_\_init\_\_.py](https://codecov.io/gh/alec-kr/F1PyStats/pull/100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZjFweXN0YXRzL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [f1pystats/f1pystats.py](https://codecov.io/gh/alec-kr/F1PyStats/pull/100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZjFweXN0YXRzL2YxcHlzdGF0cy5weQ==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

youpong commented 1 year ago

A great help in making this PR is that all HTTP requests are through the _get_json_content_from_url() method. Thanks to PR #49 by @irahorecka.