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

Comparing COMP/CRAB/python/parseCrabFjr.py (file contents):
Revision 1.5 by gutsche, Thu Oct 19 03:47:17 2006 UTC vs.
Revision 1.8 by afanfani, Mon Apr 7 18:14:28 2008 UTC

# Line 2 | Line 2
2  
3   import sys, getopt, string
4  
5 < from FwkJobRep.ReportParser import readJobReport
5 > from ProdCommon.FwkJobRep.ReportParser import readJobReport
6   from DashboardAPI import apmonSend, apmonFree
7  
8  
# Line 60 | Line 60 | def main(argv) :
60  
61      exit_status = ''
62      
63 <    # get ExitStatus of last error
64 <    if len(jobReport.errors) != 0 :
65 <        exit_status = str(jobReport.errors[-1]['ExitStatus'])
66 <    else :
67 <        exit_status = str(0)
63 >    ##### temporary fix for FJR incomplete ####
64 >    fjr = open (input)
65 >    len_fjr = len(fjr.readlines())
66 >    if (len_fjr <= 6):
67 >       ### 50115 - cmsRun did not produce a valid/readable job report at runtime
68 >       exit_status = str(50115)
69 >    else:
70 >        # get ExitStatus of last error
71 >        if len(jobReport.errors) != 0 :
72 >            exit_status = str(jobReport.errors[-1]['ExitStatus'])
73 >        else :
74 >            exit_status = str(0)
75  
76      # get i/o statistics
77      storageStatistics = str(jobReport.storageStatistics)
# Line 80 | Line 87 | def main(argv) :
87          data_fields = data.split(';')
88          for data_field in data_fields:
89              # parse: format protocol/action = attepted/succedeed/total-size/total-time/min-time/max-time
90 +            if data_field == ' ' or not data_field or data_field == '':
91 +               continue
92              key = data_field.split('=')[0].strip()
93              item = data_field.split('=')[1].strip()
94              protocol = str(key.split('/')[0].strip())

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines