Formatting

This commit is contained in:
Nick Mowen 2023-11-06 06:35:20 -07:00
parent 8b3df3edd8
commit 53dc378d88

View File

@ -280,7 +280,9 @@ class FrigateApp:
logger.error("Unable to write to /config to save DB state") logger.error("Unable to write to /config to save DB state")
def cleanup_timeline_db(db: SqliteExtDatabase) -> None: def cleanup_timeline_db(db: SqliteExtDatabase) -> None:
db.execute_sql("DELETE FROM timeline WHERE source_id NOT IN (SELECT id FROM event);") db.execute_sql(
"DELETE FROM timeline WHERE source_id NOT IN (SELECT id FROM event);"
)
try: try:
with open(f"{CONFIG_DIR}/.timeline", "w") as f: with open(f"{CONFIG_DIR}/.timeline", "w") as f:
@ -303,8 +305,8 @@ class FrigateApp:
router = Router(migrate_db) router = Router(migrate_db)
router.run() router.run()
# this is a temporary check to clean up user DB from beta # this is a temporary check to clean up user DB from beta
# will be removed before final release # will be removed before final release
if not os.path.exists(f"{CONFIG_DIR}/.timeline"): if not os.path.exists(f"{CONFIG_DIR}/.timeline"):
cleanup_timeline_db(migrate_db) cleanup_timeline_db(migrate_db)