Beispiel #1
0
            tolog("Warning: Could not copy metadata-%d.xml to site work dir - ddm Adder problems will occure in case of job recovery" % \
                  (job.jobId))

        if job.result[0] == 'holding' and job.result[1] == 0:
            try:
                # create the data directory
                os.makedirs(job.datadir)
            except OSError, e:
                tolog("!!WARNING!!3000!! Could not create data directory: %s, %s" % (job.datadir, str(e)))
            else:
                # find all remaining files in case 'rf' is not empty
                remaining_files = []
                moved_files_list = []
                try:
                    if rf != None:
                        moved_files_list = RunJobUtilities.getFileNamesFromString(rf[1])
                        remaining_files = RunJobUtilities.getRemainingFiles(moved_files_list, job.outFiles) 
                except Exception, e:
                    tolog("!!WARNING!!3000!! Illegal return value from Mover: %s, %s" % (str(rf), str(e)))
                    remaining_files = job.outFiles

                # move all remaining output files to the data directory
                nr_moved = 0
                for _file in remaining_files:
                    try:
                        os.system("mv %s %s" % (_file, job.datadir))
                    except OSError, e:
                        tolog("!!WARNING!!3000!! Failed to move file %s (abort all)" % (_file))
                        break
                    else:
                        nr_moved += 1