Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ipsframework/ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 13 additions & 13 deletions ipsframework/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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():
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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' %
Expand Down