mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:56:22 +00:00
UI: StatManager: Vacuum on bulk deletes.
This commit is contained in:
parent
b88e396df2
commit
25bbd18d3b
@ -214,6 +214,8 @@ bool StatManager::clear()
|
||||
if (!sqliteDb()->execute(StatSql::sqlClear))
|
||||
return false;
|
||||
|
||||
sqliteDb()->execute(StatSql::sqlVacuum);
|
||||
|
||||
clearAppIdCache();
|
||||
|
||||
quotaManager()->clear();
|
||||
@ -401,6 +403,8 @@ bool StatManager::deleteConnAll()
|
||||
sqliteDb()->stmt(StatSql::sqlDeleteAllConnBlock) },
|
||||
sqliteDb()->stmt(StatSql::sqlSelectDeletedAllConnAppList));
|
||||
|
||||
sqliteDb()->execute(StatSql::sqlVacuum);
|
||||
|
||||
sqliteDb()->commitTransaction();
|
||||
|
||||
m_connBlockIdMin = m_connBlockIdMax = 0;
|
||||
|
@ -203,5 +203,6 @@ const char *const StatSql::sqlClear = "DELETE FROM app;"
|
||||
"DELETE FROM conn;"
|
||||
"DELETE FROM conn_block;"
|
||||
"DELETE FROM conn_traffic;"
|
||||
"DELETE FROM conn_flow;"
|
||||
"VACUUM;";
|
||||
"DELETE FROM conn_flow;";
|
||||
|
||||
const char *const StatSql::sqlVacuum = "VACUUM;";
|
||||
|
@ -81,6 +81,7 @@ public:
|
||||
static const char *const sqlSelectDeletedAllConnAppList;
|
||||
|
||||
static const char *const sqlClear;
|
||||
static const char *const sqlVacuum;
|
||||
};
|
||||
|
||||
#endif // STATSQL_H
|
||||
|
Loading…
Reference in New Issue
Block a user