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 proper retry support when transient errors occur #7

Merged
merged 14 commits into from
Jan 30, 2020

Conversation

x8lucas8x
Copy link
Contributor

I've changed the retry behaviour to retry all requests that had transient errors, instead of only doing that when all failures were transient. Besides, transient errors now include not only what facebook classifies as is_transient, but also all 500 requests, given not all 500 requests from facebook have is_transient in the payload.

As part of this PR I have reformatted everything with black and added pre-commit hooks to run it on commit. A flake8 plugin was also added to check whether code is black formatted.

@x8lucas8x x8lucas8x requested a review from a team as a code owner January 30, 2020 16:10
@coveralls
Copy link

coveralls commented Jan 30, 2020

Pull Request Test Coverage Report for Build 29

  • 326 of 328 (99.39%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 97.832%

Changes Missing Coverage Covered Lines Changed/Added Lines %
wespe/batch_uploaders/facebook/facebook_batch.py 68 69 98.55%
wespe/batch_uploaders/facebook/facebook_batch_response.py 10 11 90.91%
Totals Coverage Status
Change from base Build 27: 0.4%
Covered Lines: 361
Relevant Lines: 369

💛 - Coveralls

@x8lucas8x x8lucas8x merged commit 4586df3 into master Jan 30, 2020
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.

None yet

3 participants