mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-03-04 23:27:46 +01:00
Work on db cleanup tool
This commit is contained in:
@@ -17,7 +17,7 @@ def init_database(database_connection_string, read_only=False):
|
||||
database_connection_string += "?mode=ro"
|
||||
kwargs["connect_args"] = {"uri": True}
|
||||
else:
|
||||
kwargs["connect_args"] = {"timeout": 60}
|
||||
kwargs["connect_args"] = {"timeout": 300}
|
||||
else:
|
||||
kwargs["pool_size"] = 20
|
||||
kwargs["max_overflow"] = 50
|
||||
|
||||
@@ -7,7 +7,7 @@ def init_database(database_connection_string):
|
||||
if not database_connection_string.startswith('sqlite'):
|
||||
kwargs['pool_size'] = 20
|
||||
kwargs['max_overflow'] = 50
|
||||
engine = create_async_engine(database_connection_string, echo=False, connect_args={"timeout": 60})
|
||||
engine = create_async_engine(database_connection_string, echo=False, connect_args={"timeout": 300})
|
||||
async_session = async_sessionmaker(engine, expire_on_commit=False)
|
||||
|
||||
async def create_tables():
|
||||
|
||||
@@ -1585,7 +1585,7 @@ async def api_config(request):
|
||||
site = CONFIG.get("site", {})
|
||||
safe_site = {
|
||||
"map_interval": site.get("map_interval", 3), # default 3 if missing
|
||||
"firehose_interval": site.get("firehose_interval", 3) # default 1000 if missing
|
||||
"firehose_interval": site.get("firehose_interval", 3) # default 3 if missing
|
||||
}
|
||||
|
||||
safe_config = {"site": safe_site}
|
||||
|
||||
@@ -101,4 +101,4 @@ minute = 00
|
||||
# Number of rows to delete per batch
|
||||
batch_size = 100
|
||||
# Run VACUUM after cleanup
|
||||
vacuum = True
|
||||
vacuum = False
|
||||
Reference in New Issue
Block a user