From 670595512a64a11252336a1f7c698cf8eedb4fe0 Mon Sep 17 00:00:00 2001 From: Wainer Vandelli <Wainer.Vandelli@cern.ch> Date: Wed, 14 Dec 2011 18:06:56 +0000 Subject: [PATCH] No need to delete leftover copying files from castor --- Script/ManagerThread.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Script/ManagerThread.py b/Script/ManagerThread.py index f47e356..c67e96c 100755 --- a/Script/ManagerThread.py +++ b/Script/ManagerThread.py @@ -397,7 +397,7 @@ class ManagerThread(threading.Thread): stagehost = filter(lambda x: 'StageHost' in x,allLines)[0].split()[2] self.logInfo = {'file':self.logger.findCaller()[0],'line':self.logger.findCaller()[1]} self.logger.debug('Castor Info: pool = ' + pool + ' , copy directory = ' + CastorDir + ' , stage host = ' + stagehost,extra = self.logInfo) - if infoFile.endswith(copying_ext): self.clearCastor(filename,pool,CastorDir,stagehost) + if not infoFile.endswith(copied_ext): os.rename(infoFile,filename + tobecopied_ext) return [pool,CastorDir,stagehost] # end if @@ -475,21 +475,6 @@ class ManagerThread(threading.Thread): # end def writeCastorInfo() - - - ##### Delete .COPYING file in Castor, if it exists ##### - def clearCastor(self,filename,Pool,CastorDir,StageHost): - self.logInfo = {'file':self.logger.findCaller()[0],'line':self.logger.findCaller()[1]} - self.logger.debug('Delete ' + filename + ' in Castor, it it exists',extra = self.logInfo) - CastorFile = os.path.join(CastorDir,os.path.basename(filename)) - castorEnv = {'RFIO_USE_CASTOR_V2':'YES','STAGE_HOST':StageHost,'STAGE_SVCCLASS':Pool} - rfrm = Popen(['rfrm', CastorFile],stdout = PIPE, stderr = STDOUT,env = castorEnv) - rfrm.wait() - self.logInfo = {'file':self.logger.findCaller()[0],'line':self.logger.findCaller()[1]} - self.logger.debug(rfrm.stdout.read(),extra = self.logInfo) - # end def clearCastor() - - ##### Exit handler: exit in clean way ##### def managerExit(self): -- GitLab