mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-07 17:23:05 +02:00
Misc cruft -- filtering, pagination tests, etc.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import logging
|
||||
from hashlib import sha256
|
||||
from sqlite3 import OperationalError
|
||||
|
||||
import aiosqlite
|
||||
from fastapi import APIRouter, BackgroundTasks
|
||||
@@ -288,7 +289,9 @@ async def run_maintenance(request: MaintenanceRequest) -> MaintenanceResult:
|
||||
await vacuum_conn.executescript("VACUUM;")
|
||||
vacuumed = True
|
||||
logger.info("Database vacuumed")
|
||||
except Exception as e:
|
||||
except OperationalError as e:
|
||||
logger.warning("VACUUM skipped (database busy): %s", e)
|
||||
except Exception as e:
|
||||
logger.error("VACUUM failed unexpectedly: %s", e)
|
||||
|
||||
return MaintenanceResult(packets_deleted=deleted, vacuumed=vacuumed)
|
||||
|
||||
Reference in New Issue
Block a user