mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-04-28 00:20:48 +00:00
vacuum database on start to shrink its file size
This commit is contained in:
parent
30d8b11573
commit
af0e814576
1 changed files with 5 additions and 1 deletions
6
web.py
6
web.py
|
|
@ -43,7 +43,8 @@ class ReticulumWebChat:
|
|||
lxmf_router_path = os.path.join(storage_path, "lxmf_router")
|
||||
|
||||
# init database
|
||||
database.database.initialize(SqliteDatabase(database_path))
|
||||
sqlite_database = SqliteDatabase(database_path)
|
||||
database.database.initialize(sqlite_database)
|
||||
self.db = database.database
|
||||
self.db.connect()
|
||||
self.db.create_tables([
|
||||
|
|
@ -51,6 +52,9 @@ class ReticulumWebChat:
|
|||
database.LxmfMessage,
|
||||
])
|
||||
|
||||
# vacuum database on start to shrink its file size
|
||||
sqlite_database.execute_sql("VACUUM")
|
||||
|
||||
# init config
|
||||
self.config = Config()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue