Skip to content

Commit 25b4359

Browse files
committed
address PR comments
1 parent 9d7dcc0 commit 25b4359

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

nucleus/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
)
9393
from .constants import (
9494
NUCLEUS_ENDPOINT,
95-
DEFAULT_TIMEOUT,
95+
DEFAULT_NETWORK_TIMEOUT_SEC,
9696
ERRORS_KEY,
9797
ERROR_ITEMS,
9898
ERROR_PAYLOAD,
@@ -1022,7 +1022,7 @@ def _make_grequest(
10221022
session=sess,
10231023
files=payload,
10241024
auth=(self.api_key, ""),
1025-
timeout=DEFAULT_TIMEOUT,
1025+
timeout=DEFAULT_NETWORK_TIMEOUT_SEC,
10261026
)
10271027
else:
10281028
post = requests_command(
@@ -1031,7 +1031,7 @@ def _make_grequest(
10311031
json=payload,
10321032
headers={"Content-Type": "application/json"},
10331033
auth=(self.api_key, ""),
1034-
timeout=DEFAULT_TIMEOUT,
1034+
timeout=DEFAULT_NETWORK_TIMEOUT_SEC,
10351035
)
10361036
return post
10371037

@@ -1055,7 +1055,7 @@ def _make_request_raw(
10551055
json=payload,
10561056
headers={"Content-Type": "application/json"},
10571057
auth=(self.api_key, ""),
1058-
timeout=DEFAULT_TIMEOUT,
1058+
timeout=DEFAULT_NETWORK_TIMEOUT_SEC,
10591059
)
10601060
logger.info("API request has response code %s", response.status_code)
10611061

nucleus/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NUCLEUS_ENDPOINT = "https://api.scale.com/v1/nucleus"
2-
DEFAULT_TIMEOUT = 60
2+
DEFAULT_NETWORK_TIMEOUT_SEC = 60
33
ITEMS_KEY = "items"
44
ITEM_KEY = "item"
55
REFERENCE_ID_KEY = "reference_id"

0 commit comments

Comments
 (0)