From: Oleg Broytman Date: Mon, 19 Aug 2024 14:51:20 +0000 (+0300) Subject: Refactor(bkmk_rmultirequests): Change parent to `robot_base` X-Git-Tag: 6.1.0~18 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=733e04740717c4f33d7fb88bea1910106bc2a29e;p=bookmarks_db.git Refactor(bkmk_rmultirequests): Change parent to `robot_base` `bkmk_rmultirequests` instantiates `bkmk_rrequests` in the workers but itself doesn't really use anything from `bkmk_rrequests`, so it can be just a base robot. --- diff --git a/Robots/bkmk_rmultirequests.py b/Robots/bkmk_rmultirequests.py index 624263a..0c7dbd4 100644 --- a/Robots/bkmk_rmultirequests.py +++ b/Robots/bkmk_rmultirequests.py @@ -16,7 +16,7 @@ import concurrent.futures import os from bkmk_objects import copy_bkmk -from Robots.bkmk_rrequests import robot_requests +from Robots.base import robot_base from Robots.multi_mixin import multi_mixin from robots import import_robot, set_params, robot_params @@ -24,7 +24,7 @@ from robots import import_robot, set_params, robot_params cpu_count = os.cpu_count() -class robot_multirequests(multi_mixin, robot_requests): +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 @@ -36,7 +36,7 @@ class robot_multirequests(multi_mixin, robot_requests): else self.concurrent_class self.concurrent_class_name = concurrent_class.__name__ multi_mixin.__init__(self, *args, **kw) - robot_requests.__init__(self, *args, **kw) + robot_base.__init__(self, *args, **kw) self.executor = concurrent_class(max_workers=self.max_urls) def version_str(self):