Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Nov 6, 2023
1 parent 8b3df3e commit 53dc378
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frigate/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ def vacuum_db(db: SqliteExtDatabase) -> None:
logger.error("Unable to write to /config to save DB state")

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:
with open(f"{CONFIG_DIR}/.timeline", "w") as f:
Expand All @@ -303,8 +305,8 @@ def cleanup_timeline_db(db: SqliteExtDatabase) -> None:
router = Router(migrate_db)
router.run()

# this is a temporary check to clean up user DB from beta
# will be removed before final release
# this is a temporary check to clean up user DB from beta
# will be removed before final release
if not os.path.exists(f"{CONFIG_DIR}/.timeline"):
cleanup_timeline_db(migrate_db)

Expand Down

0 comments on commit 53dc378

Please sign in to comment.