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

Comparing COMP/CRAB/python/GetOutput.py (file contents):
Revision 1.12 by spiga, Tue Apr 15 14:20:18 2008 UTC vs.
Revision 1.13 by spiga, Sun Apr 20 09:12:46 2008 UTC

# Line 106 | Line 106 | class GetOutput(Actor):
106  
107          cwd = os.getcwd()
108          os.chdir( self.outDir )
109 +        success_ret = 0
110          for id in self.list_id:
111              file = 'out_files_'+ str(id)+'.tgz'
112              if os.path.exists(file):
# Line 115 | Line 116 | class GetOutput(Actor):
116                  cmd_out2 = runCommand(cmd_2)
117              else:  
118                  msg ="Output files for job "+ str(id) +" not available.\n"
119 <                common.logger.message(msg)
119 >                common.logger.debug(1,msg)
120                  continue  
121              input = 'crab_fjr_' + str(id) + '.xml'
122              if os.path.exists(input):
# Line 125 | Line 126 | class GetOutput(Actor):
126              else:
127                  msg = "Problems with "+str(input)+". File not available.\n"
128                  common.logger.message(msg)
129 +            success_ret +=1
130          os.chdir( cwd )
131          common._db.updateRunJob_(job_id , listCode)
132  
# Line 139 | Line 141 | class GetOutput(Actor):
141              msg = 'Results of Jobs # '+str(self.list_id)+' are in '+self.outDir+' (log files are in '+self.logDir+')'
142              common.logger.message(msg)
143          else:
144 <            msg = 'Results of Jobs # '+str(self.list_id)+' are in '+self.outDir
144 >            if success_ret > 0:
145 >                msg = 'Results of Jobs # '+str(self.list_id)+' are in '+self.outDir
146 >            else:
147 >                msg = 'Any output file available for Jobs # '+str(self.list_id)
148              common.logger.message(msg)
149  
150          return
# Line 172 | Line 177 | class GetOutput(Actor):
177              for error in jobReport.errors:
178                  if error['Type'] == 'WrapperExitCode':
179                      codeValue["wrapperReturnCode"] = error['ExitStatus']
175                    #print "wrapperReturnCode = ", error['ExitStatus']
180                  elif error['Type'] == 'ExeExitCode':    
181                      codeValue["applicationReturnCode"] = error['ExitStatus']
178                    #print "applicationReturnCode = ", error['ExitStatus']
182                  else:
183                      continue
184  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines