Final Testing

This commit is contained in:
Donald Zou
2025-12-07 11:20:48 +08:00
parent d51815e0f7
commit f4f0ab27ef
99 changed files with 63 additions and 180 deletions

View File

@@ -1271,6 +1271,10 @@ class WireguardConfiguration:
db.execute(
self.peersTransferTable.delete()
)
with self.engine.connect() as conn:
if conn.dialect.name == 'sqlite':
print("[WGDashboard] SQLite Vacuuming Database")
conn.execute(sqlalchemy.text('VACUUM;'))
except Exception as e:
return False
return True
@@ -1281,6 +1285,10 @@ class WireguardConfiguration:
db.execute(
self.peersHistoryEndpointTable.delete()
)
with self.engine.connect() as conn:
if conn.dialect.name == 'sqlite':
print("[WGDashboard] SQLite Vacuuming Database")
conn.execute(sqlalchemy.text('VACUUM;'))
except Exception as e:
return False
return True