From 18d62ec92b602a680794f68ad7db3308b1fd9959 Mon Sep 17 00:00:00 2001 From: Jonas <jonas@holm.tech> Date: Fri, 8 Mar 2019 09:42:31 +0100 Subject: [PATCH] Rename: CheckThread self.ers_flag => self.partition_connected --- Script/cs/Threads/CheckThread.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Script/cs/Threads/CheckThread.py b/Script/cs/Threads/CheckThread.py index 85042c5..1880cb3 100644 --- a/Script/cs/Threads/CheckThread.py +++ b/Script/cs/Threads/CheckThread.py @@ -38,7 +38,7 @@ class CheckThread(threading.Thread): ##### Define Thread internal variables ##### self.exitFlag = False - self.ers_flag = True + self.partition_connected = True ##### Set Logger for CheckThread ##### self.logFile = os.path.join(self.LogDir,'CheckLog.out') @@ -74,17 +74,17 @@ class CheckThread(threading.Thread): return ##### Check for a new partition ##### - if self.IPCPartition(self.partition).isValid() and not self.ers_flag: + if self.IPCPartition(self.partition).isValid() and not self.partition_connected: self.event.wait(self.ERSTimeout) self.check_logger.warning('Found partition %s, adding ERS', self.partition) - self.ers_flag = True + self.partition_connected = True ##### Add ERS handlers to all loggers ##### self.change_state_ers(True) ##### Check for the disappearance of partition ##### - elif self.ers_flag and not self.IPCPartition(self.partition).isValid(): + elif self.partition_connected and not self.IPCPartition(self.partition).isValid(): self.check_logger.warning('Lost connection to partition %s, removing ERS handlers', self.partition) - self.ers_flag = False + self.partition_connected = False ##### Remove ERS handlers from all loggers ##### self.change_state_ers(False) self.event.wait(self.CheckTimeout) -- GitLab