]> git.phdru.name Git - bookmarks_db.git/commitdiff
Refactor(Robots): Connect timeout
authorOleg Broytman <phd@phdru.name>
Mon, 5 Aug 2024 10:41:08 +0000 (13:41 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 5 Aug 2024 13:07:17 +0000 (16:07 +0300)
Robots/bkmk_rcurl.py
Robots/bkmk_robot_base.py
doc/ANNOUNCE
doc/ChangeLog
setup.py

index 96f208cc1d8e055519846240071e68d5f876d43e..e4ce184c8e14aecc907f52668aa8b7775aa12596 100644 (file)
@@ -39,8 +39,8 @@ class robot_curl(robot_base):
         curl.setopt(pycurl.SSL_VERIFYHOST, 2)
         curl.setopt(curl.CAINFO, certifi.where())
         # Set timeouts to avoid hanging too long
-        curl.setopt(pycurl.CONNECTTIMEOUT, 30)
-        curl.setopt(pycurl.TIMEOUT, 60)
+        curl.setopt(pycurl.CONNECTTIMEOUT, self.connect_timeout)
+        curl.setopt(pycurl.TIMEOUT, self.timeout)
         # Parse Last-Modified
         curl.setopt(pycurl.OPT_FILETIME, 1)
 
index 26a0fec10a45c6f58ab554576a6c41630dae7f78..85edfed71c1562ec479926fb177262837e1e6096 100644 (file)
@@ -78,6 +78,7 @@ class robot_base(Robot):
     # ...but aren't accessible even through proxy
     proxy_error = set()
 
+    connect_timeout = 30
     timeout = 60
 
     def __init__(self, *args, **kw):
index b1c249a79219caf3d595b2bccb5a7e32c7a6895c..ddfb31f46f71a452faa894caa91d4a926648d8cd 100644 (file)
@@ -7,6 +7,11 @@ bookmarks.html.
 
 WHAT'S NEW
 
+Version 5.4.1 (2024-08-04)
+
+   Separate connection timeout for PycURL robot.
+   Also will be used for aiohttp.
+
 Version 5.4.0 (2024-08-02)
 
    Robot based on PycURL.
index 8c1ee7afc0abe9b5db95985c7f7aae524b62a934..57481c0ef8242aca473d8f550f44a0d0d4d091fd 100644 (file)
@@ -1,3 +1,8 @@
+Version 5.4.1 (2024-08-04)
+
+   Separate connection timeout for PycURL robot.
+   Also will be used for aiohttp.
+
 Version 5.4.0 (2024-08-02)
 
    Robot based on PycURL.
index b6d05e30131f27ac83773861f976a46f0cc36e76..27ef38b1d9690f8fdde8cb4c55c627733257dd9a 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ from setuptools import setup
 
 setup(
     name='bookmarks_db',
-    version='5.4.0',
+    version='5.4.1',
     description='Bookmarks database and Internet robot',
     long_description=open('README', 'r').read(),
     long_description_content_type="text/plain",