ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/PostMortem.py
(Generate patch)

Comparing COMP/CRAB/python/PostMortem.py (file contents):
Revision 1.16 by slacapra, Fri Jan 4 17:30:56 2008 UTC vs.
Revision 1.17 by slacapra, Mon Feb 4 16:39:52 2008 UTC

# Line 10 | Line 10 | class PostMortem(Actor):
10          self.cfg_params = cfg_params
11          self.nj_list = nj_list
12  
13 <        if common.scheduler.boss_scheduler_name == 'condor_g':
13 >        if common.scheduler.name() == 'condor_g':
14              # create hash of cfg file
15              self.hash = makeCksum(common.work_space.cfgFileName())
16          else:
# Line 39 | Line 39 | class PostMortem(Actor):
39  
40              reason = ''
41              ## SL this if-elif is the negation of OO! Mus disappear ASAP
42 <            if common.scheduler.boss_scheduler_name == "edg" or common.scheduler.boss_scheduler_name == "glite" or common.scheduler.boss_scheduler_name == "glitecoll":
42 >            if common.scheduler.name() == "edg" or common.scheduler.name() == "glite" or common.scheduler.name() == "glitecoll":
43                  loggingInfo = EdgLoggingInfo.EdgLoggingInfo()
44                  reason = loggingInfo.decodeReason(out)
45 <            elif common.scheduler.boss_scheduler_name == "condor_g" :
45 >            elif common.scheduler.name() == "condor_g" :
46                  loggingInfo = CondorGLoggingInfo.CondorGLoggingInfo()
47                  reason = loggingInfo.decodeReason(out)
48              else :
49 +                loggingInfo = None
50                  reason = out
51  
52              common.logger.message('Logging info for job '+ str(id) +': '+str(reason)+'\n      written to '+str(fname) )
53              
54              # ML reporting
55              jobId = ''
56 <            if common.scheduler.boss_scheduler_name == 'condor_g':
56 >            if common.scheduler.name() == 'condor_g':
57                  jobId = str(id) + '_' + self.hash + '_' + v
58              else:
59                  jobId = str(id) + '_' + v
60  
61 <            params = {'taskId': self.cfg_params['taskId'], 'jobId':  jobId, \
62 <                      'sid': v,
63 <                      'PostMortemCategory': loggingInfo.getCategory(), \
64 <                      'PostMortemReason': loggingInfo.getReason()}
61 >            if loggingInfo:
62 >                params = {'taskId': common.taskDB.dict('taskId'), 'jobId':  jobId, \
63 >                          'sid': v,
64 >                          'PostMortemCategory': loggingInfo.getCategory(), \
65 >                          'PostMortemReason': loggingInfo.getReason()}
66 >            else:
67 >                params = {'taskId': common.taskDB.dict('taskId'), 'jobId':  jobId, \
68 >                          'sid': v}
69              common.apmon.sendToML(params)
70              pass
71  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines