From d769d9a35dae5d71fcf6a875b005aedff3012e9b Mon Sep 17 00:00:00 2001
From: Fabrice Le Goff <fabrice.le.goff@cern.ch>
Date: Fri, 24 Aug 2018 18:46:30 +0200
Subject: [PATCH] cleaning: useless comments and member in ManagerThread

---
 Script/ManagerThread.py | 24 +-----------------------
 1 file changed, 1 insertion(+), 23 deletions(-)

diff --git a/Script/ManagerThread.py b/Script/ManagerThread.py
index bc3a653..a93ca1f 100644
--- a/Script/ManagerThread.py
+++ b/Script/ManagerThread.py
@@ -53,7 +53,6 @@ class ManagerThread(threading.Thread):
         self.CopyFileList = []
         self.ProblDict = {}
         self.exitFlag = False
-        self.updateFlag = True
         self.Year = ''
         self.Month = ''
 
@@ -79,9 +78,6 @@ class ManagerThread(threading.Thread):
 
 
     def initialize(self):
-         ##### Do not update configuration parameters while an 'ls' on disk is ongoing #####
-        self.updateFlag = False
-
         #Check current year and month for directory streaming
         self.updateDates()
 
@@ -94,7 +90,6 @@ class ManagerThread(threading.Thread):
                     Constants.copying_ext, Constants.problematic_ext))):
                 if len(file(oldfile).readlines()) < 4: os.remove(oldfile)
 
-
         ##### Handle .COPIED files from previous run #####
         self.logger.info('Handle .COPIED files from previous run')
         for folder in self.DirList:
@@ -109,8 +104,6 @@ class ManagerThread(threading.Thread):
                 self.DeleteQueue.put([DataFile,CastorPool,CastorDir,StageHost])
                 #block until room is available in the queue ?????
                 self.logger.debug('File: '+ DataFile + ' in DeleteQueue')
-            # end for
-        # end for
 
         self.logger.info('Size of DeleteQueue: ' + str(self.DeleteQueue.qsize()))
 
@@ -124,16 +117,11 @@ class ManagerThread(threading.Thread):
             self.CopyQueue.put(element)
             #block until room is available in the queue ?????
             self.logger.debug('File: ' + element[0] + ' in CopyQueue')
-        # end for
-        self.logger.info('Size of CopyQueue: ' + str(self.CopyQueue.qsize()))
 
-        ##### Now it's possible to update configuration parameters #####
-        self.updateFlag = True
+        self.logger.info('Size of CopyQueue: ' + str(self.CopyQueue.qsize()))
 
 
     def loop(self):
-
-
         while not self.exitFlag:
 
             ##### Sleep to safe CPU #####
@@ -162,12 +150,8 @@ class ManagerThread(threading.Thread):
                 ##### Count the deleted files #####
                 clearCounter += 1
 
-            # end while
             self.logger.info('Size of ClearQueue: ' + str(self.ClearQueue.qsize()))
 
-            ##### Do not update configuration parameters while an 'ls' on disk is ongoing #####
-            self.updateFlag = False
-
             ##### After deletion of nDel files, update the list of files to be copied and the copy queue #####
             self.logger.info('Update the list of files to be copied')
             NewList = self.getCopyFiles()
@@ -179,14 +163,10 @@ class ManagerThread(threading.Thread):
             # end for
             self.logger.info('Size of CopyQueue: ' + str(self.CopyQueue.qsize()))
 
-            ##### Now it's possible to update configuration parameters #####
-            self.updateFlag = True
-
             #Check current year and month for directory streaming
             self.updateDates()
 
 
-
     ## Class run(): inheretided from the threading.Thread run() class
     # Defines all the actions the Manager Thread has to take
     def run(self):
@@ -204,8 +184,6 @@ class ManagerThread(threading.Thread):
                                  e.filename, e.strerror)
 
         self.logger.info('ManagerThread exited')
-    # end def run()
-
 
 
     ##### Get the (new) files to be copied #####
-- 
GitLab