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

Comparing COMP/CRAB/python/Reporter.py (file contents):
Revision 1.6 by spiga, Fri May 29 07:16:16 2009 UTC vs.
Revision 1.7 by spiga, Fri May 29 11:38:33 2009 UTC

# Line 16 | Line 16 | class Reporter(Actor):
16          The main method of the class: report status of a task
17          """
18          common.logger.debug( "Reporter::run() called")
19 <        task = common.scheduler.queryEverything(1)
19 >        task = common._db.getTask()
20 >
21          msg= "--------------------\n"
22          msg +=  "Dataset: %s\n"%str(task['dataset'])
23          if self.cfg_params.has_key('USER.copy_data') and int(self.cfg_params['USER.copy_data'])==1:
24              msg+=  "Remote output :\n"
25              ## TODO: SL should come from jobDB!
26              from PhEDExDatasvcInfo import PhEDExDatasvcInfo
27 +
28              stageout = PhEDExDatasvcInfo(self.cfg_params)
29              endpoint, lfn, SE, SE_PATH, user = stageout.getEndpoint()
30              #print endpoint, lfn, SE, SE_PATH, user
# Line 59 | Line 61 | class Reporter(Actor):
61              if (job.runningJob['applicationReturnCode']>0 or job.runningJob['wrapperReturnCode']>0): continue
62              # get FJR filename
63              fjr=task['outputDirectory']+job['outputFiles'][-1]
62            #print fjr
64              jobReport = readJobReport(fjr)
65              if len(jobReport)>0:
66                  inputFiles=jobReport[0].inputFiles
# Line 71 | Line 72 | class Reporter(Actor):
72                      #     print "Run",run,": lumi sections",runs[run]
73                      filesRead+=1
74                      eventsRead+=int(inputFile['EventsRead'])
74                    
75                  #print jobReport[0].inputFiles,'\n'
76              else:
77                  pass
# Line 81 | Line 81 | class Reporter(Actor):
81          msg+=  "Total Files read: %s reuired: %s\n"%(filesRead,filesRequired)
82          msg+=  "Total Jobs : %s \n"%len(task.getJobs())
83          list_ID={}
84 +        upTask = common.scheduler.queryEverything(task['id'])
85          for st in possible_status:
86              list_ID = common._db.queryAttrRunJob({'statusScheduler':st},'jobId')
87              if (len(list_ID)>0):
# Line 89 | Line 90 | class Reporter(Actor):
90          msg+=  "\n----------------------------\n"
91          common.logger.info(msg)  
92          return      
93 +
94 +                  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines