Skip to content

Commit 7c12fed

Browse files
committed
rename submit-side executor monitoring radio to clarify it isn't the one that will be used by remotely-executed jobs, but instead by the subit side for (eg) block related messages
this is to avoid confusion with definitions related to the worker-side radio included in the submit side class (what is at the moment the exeutor.radio_mode attribute, but will change soon) TODO: add a docstring that clarifies the purpose of this
1 parent 339d787 commit 7c12fed

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

parsl/dataflow/dflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ def add_executors(self, executors: Sequence[ParslExecutor]) -> None:
11841184
executor.hub_address = self.hub_address
11851185
executor.hub_zmq_port = self.hub_zmq_port
11861186
if self.monitoring:
1187-
executor.monitoring_radio = self.monitoring.radio
1187+
executor.submit_monitoring_radio = self.monitoring.radio
11881188
if hasattr(executor, 'provider'):
11891189
if hasattr(executor.provider, 'script_dir'):
11901190
executor.provider.script_dir = os.path.join(self.run_dir, 'submit_scripts')

parsl/executors/base.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ def __init__(
5252
*,
5353
hub_address: Optional[str] = None,
5454
hub_zmq_port: Optional[int] = None,
55-
monitoring_radio: Optional[MonitoringRadioSender] = None,
55+
submit_monitoring_radio: Optional[MonitoringRadioSender] = None,
5656
run_dir: str = ".",
5757
run_id: Optional[str] = None,
5858
):
5959
self.hub_address = hub_address
6060
self.hub_zmq_port = hub_zmq_port
61-
self.monitoring_radio = monitoring_radio
61+
self.submit_monitoring_radio = submit_monitoring_radio
6262
self.run_dir = os.path.abspath(run_dir)
6363
self.run_id = run_id
6464

@@ -147,11 +147,11 @@ def hub_zmq_port(self, value: Optional[int]) -> None:
147147
self._hub_zmq_port = value
148148

149149
@property
150-
def monitoring_radio(self) -> Optional[MonitoringRadioSender]:
150+
def submit_monitoring_radio(self) -> Optional[MonitoringRadioSender]:
151151
"""Local radio for sending monitoring messages
152152
"""
153-
return self._monitoring_radio
153+
return self._submit_monitoring_radio
154154

155-
@monitoring_radio.setter
156-
def monitoring_radio(self, value: Optional[MonitoringRadioSender]) -> None:
157-
self._monitoring_radio = value
155+
@submit_monitoring_radio.setter
156+
def submit_monitoring_radio(self, value: Optional[MonitoringRadioSender]) -> None:
157+
self._submit_monitoring_radio = value

parsl/executors/status_handling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,10 @@ def workers_per_node(self) -> Union[int, float]:
241241

242242
def send_monitoring_info(self, status: Dict) -> None:
243243
# Send monitoring info for HTEX when monitoring enabled
244-
if self.monitoring_radio:
244+
if self.submit_monitoring_radio:
245245
msg = self.create_monitoring_info(status)
246246
logger.debug("Sending message {} to hub from job status poller".format(msg))
247-
self.monitoring_radio.send((MessageType.BLOCK_INFO, msg))
247+
self.submit_monitoring_radio.send((MessageType.BLOCK_INFO, msg))
248248

249249
def create_monitoring_info(self, status: Dict[str, JobStatus]) -> Sequence[object]:
250250
"""Create a monitoring message for each block based on the poll status.

0 commit comments

Comments
 (0)