diff --git a/ipsframework/ips.py b/ipsframework/ips.py index dc197c78..51b79959 100755 --- a/ipsframework/ips.py +++ b/ipsframework/ips.py @@ -580,7 +580,7 @@ def initiate_new_simulation(self, sim_name): self.call_queue_map[call_id] = msg_list self.outstanding_calls_list[call_id] = sim_name, comp, method, arg, time.time() - def _send_monitor_event(self, sim_name='', eventType='', comment='', ok='True', target=None, operation=None, start_time=None, end_time=None): + def _send_monitor_event(self, sim_name='', eventType='', comment='', ok=True, target=None, operation=None, start_time=None, end_time=None): """ Publish a portal monitor event to the *_IPS_MONITOR* event topic. Event topics that start with an underscore are reserved for use by the diff --git a/ipsframework/services.py b/ipsframework/services.py index ed6022ef..9922ffed 100644 --- a/ipsframework/services.py +++ b/ipsframework/services.py @@ -390,7 +390,7 @@ def _get_service_response(self, msg_id, block=True): def _send_monitor_event(self, eventType='', comment='', - ok='True', + ok=True, state='Running', event_time=None, elapsed_time=None, @@ -1306,7 +1306,7 @@ def stage_input_files(self, input_file_list): self._send_monitor_event('IPS_STAGE_INPUTS', 'Files = ' + str(input_file_list) + ' Exception raised : ' + str(e), - ok='False') + ok=False) self.exception('Error in stage_input_files') raise e for (_, old_conf, _, _) in self.sub_flows.values(): @@ -1323,7 +1323,7 @@ def stage_input_files(self, input_file_list): self._send_monitor_event('IPS_STAGE_INPUTS', 'Files = ' + str(input_files) + ' Exception raised : ' + str(e), - ok='False') + ok=False) self.exception('Error in stage_input_files') raise e elapsed_time = time.time() - start_time @@ -1368,7 +1368,7 @@ def stage_subflow_output_files(self, subflow_name='ALL'): self._send_monitor_event('IPS_STAGE_SUBFLOW_OUTPUTS', 'Files = ' + str(output_files) + ' Exception raised : ' + str(e), - ok='False') + ok=False) self.exception('Error in stage_subflow_output_files() for subflow %s' % sim_name) raise else: @@ -1416,7 +1416,7 @@ def stage_output_files(self, timeStamp, file_list, keep_old_files=True, save_pla self._send_monitor_event('IPS_STAGE_OUTPUTS', 'Files = ' + str(file_list) + ' Exception raised : ' + str(e), - ok='False') + ok=False) self.exception('Error in stage_output_files()') raise @@ -1434,7 +1434,7 @@ def stage_output_files(self, timeStamp, file_list, keep_old_files=True, save_pla self._send_monitor_event('IPS_STAGE_OUTPUTS', 'Files = ' + str(file_list) + ' Exception raised : ' + e.strerror, - ok='False') + ok=False) self.exception('Error creating directory %s : %d-%s', plasma_dir, e.errno, e.strerror) raise @@ -1477,7 +1477,7 @@ def stage_output_files(self, timeStamp, file_list, keep_old_files=True, save_pla self._send_monitor_event('IPS_STAGE_OUTPUTS', 'Files = ' + str(file_list) + ' Exception raised : ' + str(why), - ok='False') + ok=False) raise # Store symlinks to component output files in a single top-level directory @@ -1561,7 +1561,7 @@ def save_restart_files(self, timeStamp, file_list): self._send_monitor_event('IPS_STAGE_RESTART', 'Files = ' + str(file_list) + ' Exception raised : ' + str(e), - ok='False') + ok=False) self.exception('Error in stage_restart_files()') raise @@ -1594,7 +1594,7 @@ def get_restart_files(self, restart_root, timeStamp, file_list): self._send_monitor_event('IPS_GET_RESTART', 'Files = ' + str(file_list) + ' Exception raised : ' + str(e), - ok='False') + ok=False) self.exception('Error in get_restart_files()') raise @@ -1625,7 +1625,7 @@ def stage_state(self, state_files=None): except Exception as e: self._send_monitor_event('IPS_STAGE_STATE', ' Exception raised : ' + str(e), - ok='False') + ok=False) self.exception('Error staging state files') raise elapsed_time = time.time() - start_time @@ -1664,7 +1664,7 @@ def update_state(self, state_files=None): print('Error updating state files', str(e)) self._send_monitor_event('IPS_UPDATE_STATE', ' Exception raised : ' + str(e), - ok='False') + ok=False) self.exception('Error updating state files') raise elapsed_time = time.time() - start_time @@ -1707,7 +1707,7 @@ def merge_current_state(self, partial_state_file, logfile=None, merge_binary=Non print('Error merging state files', str(e)) self._send_monitor_event('IPS_MERGE_PLASMA_STATE', ' Exception raised : ' + str(e), - ok='False') + ok=False) self.exception('Error merging plasma state file ' + partial_state_file) raise if ret_val == 0: @@ -1717,7 +1717,7 @@ def merge_current_state(self, partial_state_file, logfile=None, merge_binary=Non else: self._send_monitor_event('IPS_MERGE_PLASMA_STATE', ' Error in call to update_state() : ', - ok='False') + ok=False) self.error('Error merging update %s into current plasma state file %s', partial_state_file, current_plasma_state) raise Exception('Error merging update %s into current plasma state file %s' %