Skip to content

Commit add63ff

Browse files
author
Daniel Abercrombie
authored
Merge pull request #119 from dabercro/quick-fix
Merge old T0 filter into master
2 parents 95c4141 + 9ab9a7c commit add63ff

4 files changed

Lines changed: 25 additions & 5 deletions

File tree

workflowwebtools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
:author: Daniel Abercrombie <dabercro@mit.edu>
55
"""
66

7-
__version__ = '0.9.1'
7+
__version__ = '0.9.2'
88

99
__all__ = []

workflowwebtools/actionshistorylink.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def dump_json(file_name=None):
3434

3535
for workflow in actions:
3636
for subtask in history.get_step_list(workflow):
37-
if actions[workflow]['Action'] in ['acdc', 'recovery']:
37+
action = actions[workflow]['Action']
38+
if action in ['acdc', 'recovery']:
3839
parameters = actions[workflow]['Parameters'].get(
3940
'/'.join(subtask.split('/')[2:]), {})
4041
else:
@@ -52,7 +53,10 @@ def dump_json(file_name=None):
5253
'parameters':
5354
parameters
5455
}
55-
output[subtask]['parameters']['action'] = actions[workflow]['Action']
56+
57+
output[subtask]['parameters']['action'] = \
58+
action if action != 'special' else \
59+
actions[workflow]['Parameters']['action']
5660

5761
if file_name:
5862
with open(file_name, 'w') as output_file:

workflowwebtools/errorutils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def open_location(data_location):
5959
"SELECT NAME FROM CMS_UNIFIED_ADMIN.workflow WHERE lower(STATUS) LIKE '%manual%'")
6060
wkfs = [row for row, in oracle_cursor]
6161
oracle_db_conn.close()
62-
cherrypy.log('Number of workflows from database: %i' % len(wkfs))
6362
return errors_from_list(wkfs)
6463

6564
raw = None

workflowwebtools/workflowinfo.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,8 @@ def site_to_run(self, task):
385385
for site in site_set:
386386
clean_site = re.sub(r'_(ECHO_)?(Disk|MSS)$', '', site)
387387
if clean_site not in out_list and clean_site and \
388-
clean_site in all_site_list:
388+
clean_site in all_site_list and \
389+
'T0_' not in clean_site:
389390
out_list.append(clean_site)
390391

391392
out_list.sort()
@@ -450,6 +451,22 @@ def get_prep_id(self):
450451

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

454+
def get_monitoring_info(self):
455+
"""
456+
:returns: the information to send to CMSMONIT
457+
:rtype: dict
458+
"""
459+
# Dummy call to get self.explanations filled
460+
self.get_explanation(0)
461+
462+
return {
463+
'errors': self.get_errors(True),
464+
'prepID': self.get_prep_id(),
465+
'params': self.get_workflow_parameters(),
466+
'recovery': self.get_recovery_info(),
467+
'logs': self.explanations
468+
}
469+
453470

454471
class PrepIDInfo(Info):
455472
"""

0 commit comments

Comments
 (0)