Skip to content

Commit

Permalink
Merge pull request #103 from biglocalnews/more-retry
Browse files Browse the repository at this point in the history
Try more retries to patch intermittent bug
  • Loading branch information
stucka authored Jun 19, 2024
2 parents 5fa3627 + e9916ce commit 95a3cff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- id: install
name: Install Python, pipenv and Pipfile packages
uses: palewire/install-python-pipenv-pipfile@v2
uses: palewire/install-python-pipenv-pipfile@v3
with:
python-version: 3.9

Expand All @@ -34,7 +34,7 @@ jobs:

- id: install
name: Install Python, pipenv and Pipfile packages
uses: palewire/install-python-pipenv-pipfile@v2
uses: palewire/install-python-pipenv-pipfile@v3
with:
python-version: ${{ matrix.python }}

Expand All @@ -54,7 +54,7 @@ jobs:

- id: install
name: Install Python, pipenv and Pipfile packages
uses: palewire/install-python-pipenv-pipfile@v2
uses: palewire/install-python-pipenv-pipfile@v3
with:
python-version: 3.9

Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags') == 0
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9

Expand Down
7 changes: 4 additions & 3 deletions bln/client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Big Local News Python Client."""

import json
import logging
import os
Expand Down Expand Up @@ -301,7 +302,7 @@ def get_project_by_id(self, id: str):

return project

@retry(APIException, tries=2, delay=10, backoff=2)
@retry(APIException, tries=4, delay=15, backoff=3)
def get_project_by_name(self, name: str):
"""Get the project with the provided name.
Expand All @@ -324,7 +325,7 @@ def get_project_by_name(self, name: str):
# Otherwise, return the one project found
return project_list[0]

@retry(APIException, tries=3, delay=10, backoff=2)
@retry(APIException, tries=4, delay=15, backoff=3)
def download_file(self, projectId, filename, output_dir=None):
"""Download `filename` in project `projectId` to `output_dir`.
Expand Down Expand Up @@ -474,7 +475,7 @@ def _ungraphql(root):
return root


@retry(APIException, tries=3, delay=10, backoff=2)
@retry(APIException, tries=4, delay=15, backoff=3)
def _upload_file(endpoint, token, projectId, path):
logger.debug(f"uploading {path}")
path = os.path.expanduser(path)
Expand Down

0 comments on commit 95a3cff

Please sign in to comment.