Skip to content

Commit

Permalink
remove most tag-specific handling from router zmq receiver
Browse files Browse the repository at this point in the history
behaviour change; the router will not validate tags any more. it's up to the db manager to do that now,
which db manager._dispatch_to_internal already does
  • Loading branch information
benclifford committed Jul 26, 2024
1 parent 7e9d4a9 commit dc94b8a
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions parsl/monitoring/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import zmq

from parsl.log_utils import set_file_logger
from parsl.monitoring.message_type import MessageType
from parsl.monitoring.types import AddressedMonitoringMessage, TaggedMonitoringMessage
from parsl.process_loggers import wrap_with_logs
from parsl.utils import setproctitle
Expand Down Expand Up @@ -168,22 +167,7 @@ def start_zmq_listener(self) -> None:
msg_0: AddressedMonitoringMessage
msg_0 = (msg, 0)

if msg[0] == MessageType.NODE_INFO:
self.resource_msgs.put(msg_0)
elif msg[0] == MessageType.RESOURCE_INFO or msg[0] == MessageType.BLOCK_INFO:
self.resource_msgs.put(msg_0)
elif msg[0] == MessageType.TASK_INFO:
self.resource_msgs.put(msg_0)
elif msg[0] == MessageType.WORKFLOW_INFO:
self.resource_msgs.put(msg_0)
else:
# There is a type: ignore here because if msg[0]
# is of the correct type, this code is unreachable,
# but there is no verification that the message
# received from zmq_receiver_channel.recv_pyobj() is actually
# of that type.
self.logger.error("Discarding message " # type: ignore[unreachable]
f"with unknown type {msg[0].value}")
self.resource_msgs.put(msg_0)
except zmq.Again:
pass
except Exception:
Expand Down

0 comments on commit dc94b8a

Please sign in to comment.