Skip to content

Commit f54effb

Browse files
author
Laurynas Butkus
committed
Do not set default conversion timeout
1 parent 70b9db3 commit f54effb

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

convertapi/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
base_uri = 'https://v2.convertapi.com/'
1212
user_agent = 'ConvertAPI-Python/' + __version__
1313
timeout = 60
14-
conversion_timeout = 180
14+
conversion_timeout = None
1515
conversion_timeout_delta = 10
16-
upload_timeout = 600
17-
download_timeout = 600
16+
upload_timeout = 1800
17+
download_timeout = 1800
1818
max_parallel_uploads = 10
1919

2020
client = Client()

convertapi/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, from_format, to_format, params, timeout = None):
2020
def run(self):
2121
params = self.__normalize_params()
2222
from_format = self.from_format or self.__detect_format()
23-
timeout = self.timeout + convertapi.conversion_timeout_delta
23+
timeout = self.timeout + convertapi.conversion_timeout_delta if self.timeout else None
2424
path = "convert/%s/to/%s" % (from_format, self.to_format)
2525

2626
if 'converter' in params:

tests/test_convertapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def test_chained_conversion(self):
6868

6969
@raises(convertapi.ApiError)
7070
def test_api_error(self):
71-
convertapi.convert('pdf', { 'Url': 'https://www.w3.org/TR/PNG/iso_8859-1.txt' }, 'web', 600)
71+
convertapi.api_secret = 'TEST'
72+
convertapi.convert('pdf', { 'Url': 'https://www.w3.org/TR/PNG/iso_8859-1.txt' })
7273

7374
def test_user_info(self):
7475
user_info = convertapi.user()

0 commit comments

Comments
 (0)