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

Comparing COMP/CRAB/python/Publisher.py (file contents):
Revision 1.37 by fanzago, Wed Jun 24 16:46:25 2009 UTC vs.
Revision 1.40.2.1 by spiga, Tue Sep 22 22:23:08 2009 UTC

# Line 75 | Line 75 | class Publisher(Actor):
75                  self.dataset_to_import.append(dataset)
76          ###        
77              
78 <        self.import_all_parents = cfg_params.get('USER.publish_with_import_all_parents',0)
78 >        self.import_all_parents = cfg_params.get('USER.publish_with_import_all_parents',1)
79          self.skipOcheck=cfg_params.get('CMSSW.publish_zero_event',0)
80      
81          self.SEName=''
# Line 92 | Line 92 | class Publisher(Actor):
92          dbsWriter = DBSWriter(self.DBSURL,level='ERROR')
93          
94          try:
95 <            if (self.import_all_parents=='1'):
95 >            if (self.import_all_parents==1):
96                  common.logger.info("--->>> Importing all parents level")
97 <                dbsWriter.importDataset(globalDBS, datasetpath, self.DBSURL)
97 >                ### to skip the ProdCommon api exception in the case of block without location
98 >                ### skipNoSiteError=True
99 >                dbsWriter.importDataset(globalDBS, datasetpath, self.DBSURL, skipNoSiteError=True)
100              else:
101                  common.logger.info("--->>> Importing only the datasetpath " + datasetpath)
102 <                dbsWriter.importDatasetWithoutParentage(globalDBS, datasetpath, self.DBSURL)
102 >                dbsWriter.importDatasetWithoutParentage(globalDBS, datasetpath, self.DBSURL, skipNoSiteError=True)
103          except DBSWriterError, ex:
104              msg = "Error importing dataset to be processed into local DBS\n"
105              msg += "Source Dataset: %s\n" % datasetpath
# Line 268 | Line 270 | class Publisher(Actor):
270          
271          file_list = glob.glob(self.resDir+"crab_fjr*.xml")
272          ## Select only those fjr that are succesfull
273 +        if (len(file_list)==0):
274 +            common.logger.info("--->>> "+self.resDir+" empty: no file to publish on DBS")
275 +            self.exit_status = '1'
276 +            return self.exit_status
277 +
278          good_list=[]
279          for fjr in file_list:
280              reports = readJobReport(fjr)
# Line 331 | Line 338 | class Publisher(Actor):
338              return self.exit_status
339  
340          else:
341 <            common.logger.info("--->>> "+self.resDir+" empty: no file to publish on DBS")
341 >            common.logger.info("--->>> No valid files to publish on DBS. Your jobs do not report exit codes = 0")
342              self.exit_status = '1'
343              return self.exit_status
344      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines