]> git.phdru.name Git - bookmarks_db.git/commitdiff
Feat(bkmk_rmultirequests): Fix `concurrent_class` to `ProcessPoolExecutor`
authorOleg Broytman <phd@phdru.name>
Thu, 5 Sep 2024 14:03:04 +0000 (17:03 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 7 Sep 2024 11:24:34 +0000 (14:24 +0300)
Robots/bkmk_rmultirequests.py
doc/ANNOUNCE
doc/ChangeLog

index 97bc34eaef9e143ef60caa136f68625a1bdb9db8..fc66f4e032994be75a20926fc83c26d53d77eeb1 100644 (file)
@@ -25,18 +25,14 @@ cpu_count = os.cpu_count()
 
 
 class robot_multirequests(multi_mixin, robot_base):
-    concurrent_class = concurrent.futures.ProcessPoolExecutor  # or ThreadPoolExecutor # noqa: E501 line too long
-
     # We're I/O-bound, not CPU-bound
     max_urls = 2*cpu_count if cpu_count else 10
 
     def __init__(self, *args, **kw):
-        concurrent_class = getattr(concurrent.futures, self.concurrent_class) \
-            if isinstance(self.concurrent_class, str) \
-            else self.concurrent_class
-        self.concurrent_class_name = concurrent_class.__name__
+        concurrent_class = concurrent.futures.ProcessPoolExecutor
         multi_mixin.__init__(self, *args, **kw)
         robot_base.__init__(self, *args, **kw)
+        self.concurrent_class_name = concurrent_class.__name__
         self.executor = concurrent_class(max_workers=self.max_urls)
 
     def version_str(self):
index 000bd950b3c38a7b3bbf81fa5324c6cd21f92f89..8d6e40e023d2b883851a7f35bae4aa455d6e0778 100644 (file)
@@ -7,6 +7,10 @@ bookmarks.html.
 
 WHAT'S NEW
 
+Version 6.1.0 (2024-??-??)
+
+   Make bkmk_rmultirequests always multiprocess.
+
 Version 6.0.0 (2024-08-19)
 
    Robot based on aiohttp, processes multiple URLs in parallel.
index d7832a77409fccc21f7ddb290adaaf5c5bc5fb9c..bb90fc8cdc84edf74cfc3d7b6ce445b063138cb4 100644 (file)
@@ -1,3 +1,7 @@
+Version 6.1.0 (2024-??-??)
+
+   Make bkmk_rmultirequests always multiprocess.
+
 Version 6.0.0 (2024-08-19)
 
    Robot based on aiohttp, processes multiple URLs in parallel.