Skip to content

Commit

Permalink
Do not store DFK in PolledExecutorFacade
Browse files Browse the repository at this point in the history
The DFK is only used to initialise monitoring, in __init__, and is not used
after that. The object that lives beyond __init__ is self.hub_channel.

This PR should not change behaviour.
  • Loading branch information
benclifford committed Apr 8, 2024
1 parent ad69440 commit f4dffa5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions parsl/jobs/job_status_poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@
class PolledExecutorFacade:
def __init__(self, executor: BlockProviderExecutor, dfk: Optional["parsl.dataflow.dflow.DataFlowKernel"] = None):
self._executor = executor
self._dfk = dfk
self._interval = executor.status_polling_interval
self._last_poll_time = 0.0
self._status = {} # type: Dict[str, JobStatus]

# Create a ZMQ channel to send poll status to monitoring
self.monitoring_enabled = False
if self._dfk and self._dfk.monitoring is not None:
if dfk and dfk.monitoring is not None:
self.monitoring_enabled = True
hub_address = self._dfk.hub_address
hub_port = self._dfk.hub_zmq_port
hub_address = dfk.hub_address
hub_port = dfk.hub_zmq_port
context = zmq.Context()
self.hub_channel = context.socket(zmq.DEALER)
self.hub_channel.set_hwm(0)
Expand Down

0 comments on commit f4dffa5

Please sign in to comment.