From 7fe576e0d15618521d9306151024e1d5f5d7f8fa Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Fri, 1 Nov 2024 10:31:26 +0000 Subject: [PATCH] Remove unused monitoring radio source ID (#3670) crossref PR #3666 which removes a different unused monitoring source identifier. ## Type of change - Code maintenance/cleanup --- parsl/monitoring/radios.py | 13 +++---------- parsl/monitoring/remote.py | 8 +++----- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/parsl/monitoring/radios.py b/parsl/monitoring/radios.py index 1cc0d10cb2..5b8de46919 100644 --- a/parsl/monitoring/radios.py +++ b/parsl/monitoring/radios.py @@ -37,9 +37,8 @@ class FilesystemRadioSender(MonitoringRadioSender): the UDP radio, but should be much more reliable. """ - def __init__(self, *, monitoring_url: str, source_id: int, timeout: int = 10, run_dir: str): + def __init__(self, *, monitoring_url: str, timeout: int = 10, run_dir: str): logger.info("filesystem based monitoring channel initializing") - self.source_id = source_id self.base_path = f"{run_dir}/monitor-fs-radio/" self.tmp_path = f"{self.base_path}/tmp" self.new_path = f"{self.base_path}/new" @@ -66,19 +65,16 @@ def send(self, message: object) -> None: class HTEXRadioSender(MonitoringRadioSender): - def __init__(self, monitoring_url: str, source_id: int, timeout: int = 10): + def __init__(self, monitoring_url: str, timeout: int = 10): """ Parameters ---------- monitoring_url : str URL of the form ://: - source_id : str - String identifier of the source timeout : int timeout, default=10s """ - self.source_id = source_id logger.info("htex-based monitoring channel initialising") def send(self, message: object) -> None: @@ -120,21 +116,18 @@ def send(self, message: object) -> None: class UDPRadioSender(MonitoringRadioSender): - def __init__(self, monitoring_url: str, source_id: int, timeout: int = 10): + def __init__(self, monitoring_url: str, timeout: int = 10): """ Parameters ---------- monitoring_url : str URL of the form ://: - source_id : str - String identifier of the source timeout : int timeout, default=10s """ self.monitoring_url = monitoring_url self.sock_timeout = timeout - self.source_id = source_id try: self.scheme, self.ip, port = (x.strip('/') for x in monitoring_url.split(':')) self.port = int(port) diff --git a/parsl/monitoring/remote.py b/parsl/monitoring/remote.py index d374338dee..d72b54dc3c 100644 --- a/parsl/monitoring/remote.py +++ b/parsl/monitoring/remote.py @@ -103,14 +103,12 @@ def wrapped(*args: List[Any], **kwargs: Dict[str, Any]) -> Any: def get_radio(radio_mode: str, monitoring_hub_url: str, task_id: int, run_dir: str) -> MonitoringRadioSender: radio: MonitoringRadioSender if radio_mode == "udp": - radio = UDPRadioSender(monitoring_hub_url, - source_id=task_id) + radio = UDPRadioSender(monitoring_hub_url) elif radio_mode == "htex": - radio = HTEXRadioSender(monitoring_hub_url, - source_id=task_id) + radio = HTEXRadioSender(monitoring_hub_url) elif radio_mode == "filesystem": radio = FilesystemRadioSender(monitoring_url=monitoring_hub_url, - source_id=task_id, run_dir=run_dir) + run_dir=run_dir) else: raise RuntimeError(f"Unknown radio mode: {radio_mode}") return radio