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

@@ -53,7 +53,7 @@ Configure an FTP profile on the camera:
| Passive Mode | **ON** |
| Username | `fujiftp` |
| Password | *(your password)* |
| Upload Dir | `/incoming` |
| Upload Dir | `/data/photos/incoming` |
| Auto Transfer | ON (or manual trigger) |
> **Note**: Bij FTPS kun je via **FTP OPTIONAL SETTING → ROOT CERTIFICATE** een self-signed root certificaat laden als je NAS er een gebruikt.

View File

@@ -52,7 +52,7 @@
- [ ] Passive mode: ON
- [ ] Username: `fujiftp`
- [ ] Password: (het ingestelde wachtwoord)
- [ ] Upload directory: `/incoming`
- [ ] Upload directory: `/data/photos/incoming`
- [ ] Optioneel: FTP OPTIONAL SETTING → ROOT CERTIFICATE (als NAS self-signed cert gebruikt)
- [ ] Profiel naam: "NAS-FTPS"
- [ ] Opslaan

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,