stop behaviour
This commit is contained in:
parent
fd0e0e9c71
commit
1f31cfc9dc
@ -16,6 +16,7 @@ def mqttOnDisconnectCallback(client, userdata, rc):
|
||||
class AbstractMqttHandler(threading.Thread):
|
||||
def __init__(self, config):
|
||||
super().__init__()
|
||||
self.daemon = True
|
||||
|
||||
self.config = config
|
||||
|
||||
|
@ -9,6 +9,8 @@ POISON_PILL = DataObject(name="PoisonPill", topic="kill", payload=None)
|
||||
class AbstractSinkHandler(threading.Thread):
|
||||
def __init__(self, config, name, inQueue, experiment):
|
||||
super().__init__()
|
||||
self.daemon = True
|
||||
|
||||
logger.info("constructor called")
|
||||
|
||||
self.config = config
|
||||
|
@ -10,6 +10,7 @@ from DataObject import DataObject
|
||||
class GenericMqttSubscriber(AbstractMqttHandler):
|
||||
def __init__(self, config, configId, queue):
|
||||
super().__init__(config)
|
||||
self.name = configId
|
||||
localConfig = self.config[configId]
|
||||
self.dataObjectName = localConfig["dataObjectName"]
|
||||
self.subscribeTopic = localConfig["topic"]
|
||||
|
@ -26,7 +26,6 @@ class PgDbHandle(object):
|
||||
if dbPassword == "$ENV$":
|
||||
dbPassword = os.environ["DB_PASSWORD"]
|
||||
dbName = self.config["database"]["name"]
|
||||
|
||||
logger.info(f"Connect to database")
|
||||
self.connInfo = f"user={dbUser} host={dbHost} dbname={dbName} sslmode=require"
|
||||
if dbPassword != "$NONE$":
|
||||
|
@ -25,6 +25,8 @@ class e_State(Enum):
|
||||
class RigCmdHandler(threading.Thread):
|
||||
def __init__(self, config, inQueue):
|
||||
super().__init__()
|
||||
self.daemon = True
|
||||
self.name = "RigCmdHandler"
|
||||
|
||||
self.config = config
|
||||
localConfig = self.config["master"]
|
||||
|
@ -69,6 +69,9 @@ rigCmdHandler.stop()
|
||||
rigCmdHandler.join()
|
||||
logger.error("rigCmdHandler joined")
|
||||
|
||||
for t in threading.enumerate():
|
||||
logger.error(f"thread still running: {t.ident}, {t.name}")
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
logger.info("IIoTFeeder2 to terminate")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user