File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44:author: Daniel Abercrombie <dabercro@mit.edu>
55"""
66
7- __version__ = '0.9.1 '
7+ __version__ = '0.9.2 '
88
99__all__ = []
Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
454471class PrepIDInfo (Info ):
455472 """
You can’t perform that action at this time.
0 commit comments