Fix: Recarga en caliente para canales y solución a caché estancado en MySQL

This commit is contained in:
2026-03-20 13:01:26 -06:00
parent 97ce9fce86
commit df56e7d841
5 changed files with 135 additions and 9 deletions

View File

@@ -26,7 +26,8 @@ def get_connection():
password=db_config.get("password"),
database=db_config.get("name"),
consume_results=True,
connection_timeout=10
connection_timeout=10,
autocommit=True
)
print(f"[DB] MySQL conectado exitosamente")
break
@@ -52,7 +53,8 @@ def get_connection():
password=db_config.get("password"),
database=db_config.get("name"),
consume_results=True,
connection_timeout=10
connection_timeout=10,
autocommit=True
)
print(f"[DB] MySQL reconectado exitosamente")
break
@@ -72,7 +74,7 @@ def get_connection():
db_dir = os.path.dirname(db_path)
if db_dir and not os.path.exists(db_dir):
os.makedirs(db_dir, exist_ok=True)
return sqlite3.connect(db_path)
return sqlite3.connect(db_path, isolation_level=None)
def close_connection():
global _connection