Fix: Recarga en caliente para canales y solución a caché estancado en MySQL
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user