File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 92
92
)
93
93
from .constants import (
94
94
NUCLEUS_ENDPOINT ,
95
+ DEFAULT_TIMEOUT ,
95
96
ERRORS_KEY ,
96
97
ERROR_ITEMS ,
97
98
ERROR_PAYLOAD ,
@@ -1021,6 +1022,7 @@ def _make_grequest(
1021
1022
session = sess ,
1022
1023
files = payload ,
1023
1024
auth = (self .api_key , "" ),
1025
+ timeout = DEFAULT_TIMEOUT ,
1024
1026
)
1025
1027
else :
1026
1028
post = requests_command (
@@ -1029,6 +1031,7 @@ def _make_grequest(
1029
1031
json = payload ,
1030
1032
headers = {"Content-Type" : "application/json" },
1031
1033
auth = (self .api_key , "" ),
1034
+ timeout = DEFAULT_TIMEOUT ,
1032
1035
)
1033
1036
return post
1034
1037
@@ -1052,6 +1055,7 @@ def _make_request_raw(
1052
1055
json = payload ,
1053
1056
headers = {"Content-Type" : "application/json" },
1054
1057
auth = (self .api_key , "" ),
1058
+ timeout = DEFAULT_TIMEOUT ,
1055
1059
)
1056
1060
logger .info ("API request has response code %s" , response .status_code )
1057
1061
Original file line number Diff line number Diff line change 1
1
NUCLEUS_ENDPOINT = "https://api.scale.com/v1/nucleus"
2
+ DEFAULT_TIMEOUT = 30
2
3
ITEMS_KEY = "items"
3
4
ITEM_KEY = "item"
4
5
REFERENCE_ID_KEY = "reference_id"
You can’t perform that action at this time.
0 commit comments