mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
Add "Optimize" task to "cleanup section
This commit is contained in:
@@ -266,8 +266,10 @@ def cleanup_database ():
|
|||||||
openDB()
|
openDB()
|
||||||
|
|
||||||
# Cleanup Online History
|
# Cleanup Online History
|
||||||
print ('\nCleanup Online_History')
|
print ('\nCleanup Online_History...')
|
||||||
sql.execute ("""DELETE FROM Online_History WHERE Scan_Date <= date('now', '-1 day')""")
|
sql.execute ("""DELETE FROM Online_History WHERE Scan_Date <= date('now', '-1 day')""")
|
||||||
|
print ('\nOptimize Database...')
|
||||||
|
sql.execute ("VACUUM;")
|
||||||
|
|
||||||
closeDB()
|
closeDB()
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
VERSION = '3.6_leiweibau'
|
VERSION = '3.6_leiweibau'
|
||||||
VERSION_YEAR = '2022'
|
VERSION_YEAR = '2022'
|
||||||
VERSION_DATE = '2022-07-27'
|
VERSION_DATE = '2022-08-03'
|
||||||
|
|||||||
Reference in New Issue
Block a user