This commit is contained in:
2025-05-11 10:01:23 +02:00
parent e9dc7c1192
commit 1dfb1a2efa
25 changed files with 231 additions and 94 deletions

View File

@@ -3,7 +3,7 @@ import logging
logger = logging.getLogger(__name__)
def get_nodes_type(cfg, tool, unit):
def get_nodes_type(cfg: object, tool: str, unit: str) -> tuple:
with connetti_db(cfg) as conn:
cur = conn.cursor(dictionary=True)
@@ -16,7 +16,7 @@ def get_nodes_type(cfg, tool, unit):
WHERE y.type NOT IN ('Anchor Link', 'None') AND t.name = '{tool}' AND u.name = '{unit}'
ORDER BY n.num;
"""
logger.info(f"{unit} - {tool}: Executing query: {query}")
#logger.info(f"{unit} - {tool}: Executing query: {query}")
cur.execute(query)
results = cur.fetchall()
logger.info(f"{unit} - {tool}: {cur.rowcount} rows selected to get node type/Ain/Din/channels.")