From 25f8fe1428e5dad2a1c9c8abba18e980a6719291 Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Wed, 17 Jul 2024 16:23:13 +0000 Subject: [PATCH] make some parameters mandatory kwargs for each of editing See similar changes to the process worker pool, PR #2973, for more detailed justification. --- parsl/monitoring/monitoring.py | 11 ++++++++--- parsl/monitoring/router.py | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/parsl/monitoring/monitoring.py b/parsl/monitoring/monitoring.py index c9a2dc9ed7..e8a673ad81 100644 --- a/parsl/monitoring/monitoring.py +++ b/parsl/monitoring/monitoring.py @@ -154,9 +154,14 @@ def start(self, run_id: str, dfk_run_dir: str, config_run_dir: Union[str, os.Pat self.router_exit_event = Event() self.router_proc = ForkProcess(target=router_starter, - args=(comm_q, self.exception_q, self.priority_msgs, self.node_msgs, - self.block_msgs, self.resource_msgs, self.router_exit_event), - kwargs={"hub_address": self.hub_address, + kwargs={"comm_q": comm_q, + "exception_q": self.exception_q, + "priority_msgs": self.priority_msgs, + "node_msgs": self.node_msgs, + "block_msgs": self.block_msgs, + "resource_msgs": self.resource_msgs, + "exit_event": self.router_exit_event, + "hub_address": self.hub_address, "udp_port": self.hub_port, "zmq_port_range": self.hub_port_range, "logdir": self.logdir, diff --git a/parsl/monitoring/router.py b/parsl/monitoring/router.py index e0650a6761..736df765b6 100644 --- a/parsl/monitoring/router.py +++ b/parsl/monitoring/router.py @@ -211,7 +211,8 @@ def start_zmq_listener(self) -> None: @wrap_with_logs @typeguard.typechecked -def router_starter(comm_q: "Queue[Union[Tuple[int, int], str]]", +def router_starter(*, + comm_q: "Queue[Union[Tuple[int, int], str]]", exception_q: "Queue[Tuple[str, str]]", priority_msgs: "Queue[AddressedMonitoringMessage]", node_msgs: "Queue[AddressedMonitoringMessage]",