From 918fefbc57910a6cd06996497f4c8c8cda2e017a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Sun, 18 Feb 2024 17:44:10 +0100 Subject: [PATCH] added own db at mqtt publisher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/app.py b/server/app.py index 68ae3e3..99b3469 100644 --- a/server/app.py +++ b/server/app.py @@ -111,6 +111,14 @@ def connect_mqtt(): def mqtt_publisher(): # Create and start a thread for each universe + db = connect( + host=config['mysql']['host'], + user=config['mysql']['user'], + password=config['mysql']['password'], + database=config['mysql']['database'], + ) + + db.autocommit(True) mqtt_client = connect_mqtt() artnetBindIp = get_eth0_ip() artNet = Artnet.Artnet(BINDIP = artnetBindIp, DEBUG = True, SHORTNAME = "PiXelTubeMaster", LONGNAME = "PiXelTubeMaster", PORT = 6454)