File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ def __init__(self,
167
167
verify_ssl = True ,
168
168
retries = None ,
169
169
max_pool_size = 50 ,
170
+ post_timeout = (10 , 10 ),
170
171
** kwargs ):
171
172
"""Init the service class.
172
173
@@ -181,6 +182,9 @@ def __init__(self,
181
182
verify_ssl: option to not verify ssl certificates
182
183
max_pool_size: option to set the maximum number of
183
184
connections to save in the pool.
185
+ post_timeout: a float in seconds for the connect and read
186
+ timeout. Use a Tuple to specific connect and
187
+ read separately.
184
188
"""
185
189
self ._batch_logs = []
186
190
self .endpoint = endpoint
@@ -190,7 +194,7 @@ def __init__(self,
190
194
self .is_skipped_an_issue = is_skipped_an_issue
191
195
self .base_url_v1 = uri_join (self .endpoint , "api/v1" , self .project )
192
196
self .base_url_v2 = uri_join (self .endpoint , "api/v2" , self .project )
193
- self .post_timeout = ( 10 , 10 )
197
+ self .post_timeout = post_timeout
194
198
195
199
self .session = requests .Session ()
196
200
if retries :
You can’t perform that action at this time.
0 commit comments