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' |
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) |
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): |
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") |
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 |