Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #355 from gilesknap/http429
Browse files Browse the repository at this point in the history
HTTP 429
  • Loading branch information
gilesknap authored May 17, 2022
2 parents 3b986fa + a8cefbc commit 94c6a25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"] # can add , macos-latest
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
# keep matrix tight for now to avoid HTTP 429 errors
# TODO: restore macos and 3.9 and 3.10
python: ["3.8"]
python: ["3.8", "3.9"]
lock: [false]

include:
Expand Down
2 changes: 1 addition & 1 deletion src/gphotos_sync/GooglePhotosDownload.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(
retries = Retry(
total=settings.max_retries,
backoff_factor=5,
status_forcelist=[500, 502, 503, 504, 509],
status_forcelist=[500, 502, 503, 504, 509, 429],
allowed_methods=frozenset(["GET", "POST"]),
raise_on_status=False,
respect_retry_after_header=True,
Expand Down
2 changes: 1 addition & 1 deletion src/gphotos_sync/authorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def authorize(self):
retries = Retry(
total=self.max_retries,
backoff_factor=5,
status_forcelist=[500, 502, 503, 504],
status_forcelist=[500, 502, 503, 504, 429],
allowed_methods=frozenset(["GET", "POST"]),
raise_on_status=False,
respect_retry_after_header=True,
Expand Down

0 comments on commit 94c6a25

Please sign in to comment.