"""
__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2024 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2024, 2025 PhiloSoft Design"
__license__ = "GNU GPL"
__all__ = ['robot_multirequests']
from Robots.concurrent_futures import cf_multiprocess
-from robots import import_robot, set_params, robot_params
class robot_multirequests(cf_multiprocess):
- def check_bkmk_task(self):
- return check_bookmark_subproc
-
-
-def check_bookmark_subproc(bookmark):
- log_lines = []
- robot = import_robot('requests')
- set_params(robot, robot_params)
- robot.report_checked = False
- robot(log_lines.append).check_bookmark(bookmark)
- return bookmark, log_lines
+ robot_name = 'requests'
"""
__author__ = "Oleg Broytman <phd@phdru.name>"
-__copyright__ = "Copyright (C) 2024 PhiloSoft Design"
+__copyright__ = "Copyright (C) 2024, 2025 PhiloSoft Design"
__license__ = "GNU GPL"
__all__ = ['concurrent_futures']
-from queue import Queue
import concurrent.futures
import os
-import threading
from bkmk_objects import copy_bkmk
-from Robots.base import robot_base
+from robots import import_robot, set_params, robot_params
from Robots.multi_mixin import multi_mixin
async def get_url(self, url, req_headers):
raise NotImplementedError(
'This robot does not implement get_url; use non-forking robots.')
+
+ def check_bkmk_task(self):
+ return check_bookmark_subproc(self.robot_name)
+
+
+class check_bookmark_subproc(object):
+ def __init__(self, robot_name):
+ self.robot = robot = import_robot(robot_name)
+ set_params(robot, robot_params)
+
+ def __call__(self, bookmark):
+ log_lines = []
+ robot = self.robot
+ robot.report_checked = False
+ robot(log_lines.append).check_bookmark(bookmark)
+ return bookmark, log_lines