Skip to content

Commit 5964a09

Browse files
authored
Merge pull request #26 from adzerk/sc-67634/request-timeout
Pass the request timeout in a cascading manner to the API client
2 parents 1c30b18 + 3779c03 commit 5964a09

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [3.7, 3.8, 3.9]
11+
python-version: [3.9, '3.10', 3.11]
1212

1313
steps:
1414
- uses: actions/checkout@v2

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/setup-python@v1
1111
name: Set up Python
1212
with:
13-
python-version: 3.8
13+
python-version: 3.9
1414
- name: Install dependencies
1515
run: |
1616
python -m pip install --upgrade pip setuptools wheel
@@ -20,4 +20,4 @@ jobs:
2020
- uses: pypa/gh-action-pypi-publish@release/v1
2121
with:
2222
user: __token__
23-
password: ${{ secrets.PYPI_API_TOKEN }}
23+
password: ${{ secrets.PYPI_API_TOKEN }}

adzerk_decision_sdk/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def get(self, request, **kwargs):
101101
'desired_ad_map': kwargs['desired_ad_map']
102102
}
103103
api_client.set_default_header('X-Adzerk-Explain', json.dumps(header_object))
104-
104+
105105
api_client.set_default_header('X-Adzerk-Explain', kwargs['api_key'])
106106
api_client.set_default_header('X-Adzerk-ApiKey', kwargs['api_key'])
107107
if 'user_agent' in kwargs:
@@ -238,7 +238,7 @@ def read(self, user_key, **kwargs):
238238

239239
network_id = kwargs['network_id'] if 'network_id' in kwargs else self.network_id
240240
self.__logger.info(f'Requesting record for {user_key} on {network_id}')
241-
user_record = self.api.read(network_id, user_key)
241+
user_record = self.api.read(network_id, user_key, **kwargs)
242242
jsond = json.dumps(user_record)
243243
self.__logger.info(f'Received unfiltered response of: {jsond}')
244244
[user_record.pop(key, None) for key in bad_keys]

0 commit comments

Comments
 (0)