diff --git a/parsl/monitoring/db_manager.py b/parsl/monitoring/db_manager.py index 7c81e7908f..58aad71eed 100644 --- a/parsl/monitoring/db_manager.py +++ b/parsl/monitoring/db_manager.py @@ -364,7 +364,7 @@ def start(self, task_info_update_messages, task_info_insert_messages, task_info_all_messages = [], [], [] try_update_messages, try_insert_messages, try_all_messages = [], [], [] for msg_type, msg in priority_messages: - if msg_type.value == MessageType.WORKFLOW_INFO.value: + if msg_type == MessageType.WORKFLOW_INFO: if "python_version" in msg: # workflow start message logger.debug( "Inserting workflow start info to WORKFLOW table") @@ -379,7 +379,7 @@ def start(self, messages=[msg]) self.workflow_end = True - elif msg_type.value == MessageType.TASK_INFO.value: + elif msg_type == MessageType.TASK_INFO: task_try_id = str(msg['task_id']) + "." + str(msg['try_id']) task_info_all_messages.append(msg) if msg['task_id'] in inserted_tasks: diff --git a/parsl/monitoring/monitoring.py b/parsl/monitoring/monitoring.py index ddbff9d54b..84bf2b8b02 100644 --- a/parsl/monitoring/monitoring.py +++ b/parsl/monitoring/monitoring.py @@ -450,11 +450,11 @@ def start(self, try: msg = self.dfk_channel.recv_pyobj() self.logger.debug("Got ZMQ Message from DFK: {}".format(msg)) - if msg[0].value == MessageType.BLOCK_INFO.value: + if msg[0] == MessageType.BLOCK_INFO: block_msgs.put((msg, 0)) else: priority_msgs.put((msg, 0)) - if msg[0].value == MessageType.WORKFLOW_INFO.value and 'python_version' not in msg[1]: + if msg[0] == MessageType.WORKFLOW_INFO and 'python_version' not in msg[1]: break except zmq.Again: pass @@ -468,13 +468,13 @@ def start(self, try: msg = self.ic_channel.recv_pyobj() self.logger.debug("Got ZMQ Message from interchange: {}".format(msg)) - if msg[0].value == MessageType.NODE_INFO.value: + if msg[0] == MessageType.NODE_INFO: msg[2]['last_heartbeat'] = datetime.datetime.fromtimestamp(msg[2]['last_heartbeat']) msg[2]['run_id'] = self.run_id msg[2]['timestamp'] = msg[1] msg = (msg[0], msg[2]) node_msgs.put((msg, 0)) - elif msg[0].value == MessageType.BLOCK_INFO.value: + elif msg[0] == MessageType.BLOCK_INFO: block_msgs.put((msg, 0)) else: self.logger.error(f"Discarding message from interchange with unknown type {msg[0].value}")