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 workflowwebtools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
:author: Daniel Abercrombie <dabercro@mit.edu>
"""

__version__ = '0.9.1'
__version__ = '0.9.2'

__all__ = []
8 changes: 6 additions & 2 deletions workflowwebtools/actionshistorylink.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def dump_json(file_name=None):

for workflow in actions:
for subtask in history.get_step_list(workflow):
if actions[workflow]['Action'] in ['acdc', 'recovery']:
action = actions[workflow]['Action']
if action in ['acdc', 'recovery']:
parameters = actions[workflow]['Parameters'].get(
'/'.join(subtask.split('/')[2:]), {})
else:
Expand All @@ -52,7 +53,10 @@ def dump_json(file_name=None):
'parameters':
parameters
}
output[subtask]['parameters']['action'] = actions[workflow]['Action']

output[subtask]['parameters']['action'] = \
action if action != 'special' else \
actions[workflow]['Parameters']['action']

if file_name:
with open(file_name, 'w') as output_file:
Expand Down
1 change: 0 additions & 1 deletion workflowwebtools/errorutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def open_location(data_location):
"SELECT NAME FROM CMS_UNIFIED_ADMIN.workflow WHERE lower(STATUS) LIKE '%manual%'")
wkfs = [row for row, in oracle_cursor]
oracle_db_conn.close()
cherrypy.log('Number of workflows from database: %i' % len(wkfs))
return errors_from_list(wkfs)

raw = None
Expand Down
19 changes: 18 additions & 1 deletion workflowwebtools/workflowinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ def site_to_run(self, task):
for site in site_set:
clean_site = re.sub(r'_(ECHO_)?(Disk|MSS)$', '', site)
if clean_site not in out_list and clean_site and \
clean_site in all_site_list:
clean_site in all_site_list and \
'T0_' not in clean_site:
Comment thread
dabercro marked this conversation as resolved.
out_list.append(clean_site)

out_list.sort()
Expand Down Expand Up @@ -450,6 +451,22 @@ def get_prep_id(self):

return str(self.get_workflow_parameters().get('PrepID', 'NoPrepID'))

def get_monitoring_info(self):
"""
:returns: the information to send to CMSMONIT
:rtype: dict
"""
# Dummy call to get self.explanations filled
self.get_explanation(0)

return {
'errors': self.get_errors(True),
'prepID': self.get_prep_id(),
'params': self.get_workflow_parameters(),
'recovery': self.get_recovery_info(),
'logs': self.explanations
}


class PrepIDInfo(Info):
"""
Expand Down