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.40.2.2 by fanzago, Tue Sep 29 14:28:15 2009 UTC vs.
Revision 1.40.2.3 by fanzago, Tue Sep 29 16:08:41 2009 UTC

# Line 204 | Line 204 | class Publisher(Actor):
204          """
205             input:  xml file, processedDataset
206          """
207 +        common.logger.debug("FJR = %s"%file)
208          try:
209              jobReport = readJobReport(file)[0]
210              self.exit_status = '0'
# Line 245 | Line 246 | class Publisher(Actor):
246                      filestopublish.append(file)
247        
248          jobReport.files = filestopublish
249 +        for file in filestopublish:
250 +            common.logger.debug("--->>> LFN of file to publish =  " + str(file['LFN']))
251          ### if all files of FJR have number of events = 0
252          if (len(filestopublish) == 0):
253 <           return None
253 >            return None
254            
255          #// DBS to contact
256          dbswriter = DBSWriter(self.DBSURL)
# Line 255 | Line 258 | class Publisher(Actor):
258          Blocks=None
259          try:
260              Blocks=dbswriter.insertFiles(jobReport)
261 <            common.logger.info("Inserting file in blocks = %s"%Blocks)
261 >            common.logger.debug("--->>> Inserting file in blocks = %s"%Blocks)
262          except DBSWriterError, ex:
263 <            common.logger.info("Insert file error: %s"%ex)
263 >            common.logger.debug("--->>> Insert file error: %s"%ex)
264          return Blocks
265  
266      def run(self):
# Line 266 | Line 269 | class Publisher(Actor):
269          """
270          
271          file_list = glob.glob(self.resDir+"crab_fjr*.xml")
272 +        
273          ## Select only those fjr that are succesfull
274          if (len(file_list)==0):
275              common.logger.info("--->>> "+self.resDir+" empty: no file to publish on DBS")
# Line 294 | Line 298 | class Publisher(Actor):
298  
299              common.logger.info("--->>> Start files publication")
300              for file in file_list:
297                common.logger.debug( "file = "+file)
301                  Blocks=self.publishAJobReport(file,self.processedData)
302                  if Blocks:
303                      for x in Blocks: # do not allow multiple entries of the same block

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines