Fix SQLite threading bug, correct FTP upload path

- Add check_same_thread=False to SQLite connection (watchdog
  callbacks run in a separate thread)
- Camera upload dir is /data/photos/incoming (not /incoming)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nick Roodenrijs
2026-03-08 19:44:27 +01:00
parent 2a2e51b1ae
commit 88db0c1b24
3 changed files with 3 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ log = logging.getLogger("processor")
def init_db():
"""Initialize the SQLite tracking database."""
DB_PATH.parent.mkdir(parents=True, exist_ok=True)
conn = sqlite3.connect(str(DB_PATH))
conn = sqlite3.connect(str(DB_PATH), check_same_thread=False)
conn.execute(
"""CREATE TABLE IF NOT EXISTS processed_files (
filename TEXT PRIMARY KEY,