From 00c61d8046fefd8b80ef865f6a27ef0f13f02d7e Mon Sep 17 00:00:00 2001 From: leiweibau <105860611+leiweibau@users.noreply.github.com> Date: Wed, 3 Aug 2022 21:31:45 +0200 Subject: [PATCH] Add "Optimize" task to "cleanup section --- back/pialert.py | 4 +++- config/version.conf | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/back/pialert.py b/back/pialert.py index ace836d0..be2fec30 100644 --- a/back/pialert.py +++ b/back/pialert.py @@ -266,8 +266,10 @@ def cleanup_database (): openDB() # Cleanup Online History - print ('\nCleanup Online_History') + print ('\nCleanup Online_History...') sql.execute ("""DELETE FROM Online_History WHERE Scan_Date <= date('now', '-1 day')""") + print ('\nOptimize Database...') + sql.execute ("VACUUM;") closeDB() diff --git a/config/version.conf b/config/version.conf index 9607d21e..01663ec1 100644 --- a/config/version.conf +++ b/config/version.conf @@ -1,3 +1,3 @@ VERSION = '3.6_leiweibau' VERSION_YEAR = '2022' -VERSION_DATE = '2022-07-27' +VERSION_DATE = '2022-08-03'