From 733e04740717c4f33d7fb88bea1910106bc2a29e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 19 Aug 2024 17:51:20 +0300 Subject: [PATCH] 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. --- Robots/bkmk_rmultirequests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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): -- 2.39.5