diff --git a/Script/CopyThread.py b/Script/CopyThread.py index a51e1aa2027694ae5d5954b8262f8309a2580d71..f4012965d02af9576e861eb0869f5547eaa662bf 100644 --- a/Script/CopyThread.py +++ b/Script/CopyThread.py @@ -171,8 +171,10 @@ class CopyThread(threading.Thread): nb_retries = copyfile[4] if nb_retries >= self.conf.DBLookupMaxRetries: - self.logger.critical('file not found in DB after %d retries: %s. ' - 'Manual intervention required', nb_retries, copyfile[0]) + self.logger.warning('file not found in DB after %d retries: %s ; ' + 'set as problematic.', nb_retries, copyfile[0]) + os.rename(copyfile[0] + Constants.tobecopied_ext, + copyfile[0] + Constants.problematic_ext) self.ClearQueue.put(copyfile) else: self.logger.debug('file not found in DB after %d retries: %s. Will retry later.', @@ -354,7 +356,7 @@ class CopyThread(threading.Thread): CastorFile, pool) self.dbLock.release() elif self.conf.connection: - self.logger.warning('No connection to Metadata database: database will not be updated for file %s', DataFile) + self.logger.critical('No connection to Metadata database: database will not be updated for file %s', DataFile) ##### Copy successfull: rename .data.COPYING in .data.COPIED ##### os.rename(DataFile + Constants.copying_ext, diff --git a/Script/Database.py b/Script/Database.py index b1485f02d3bca6c1d38a0dc71ce5c436150ac8b1..84d619e0ce88b7886a8d59c387738ff4d75d34d7 100644 --- a/Script/Database.py +++ b/Script/Database.py @@ -214,9 +214,8 @@ class Database: nrow = self.db.execute(args,keys) if nrow != 1: - self.logger.error('Transfer of file: ' + sfofile + - ' in ' + castorfile + - ' .Not exactly one entry updated in file table') + self.logger.critical('transfer of file %s to %s: not exactly one entry updated in file table (%s)', + sfofile, castorfile, str(nrow)) else: self.logger.debug('File table. File state updated to TRANSFERRED for file: ' + sfofile) # end if,else