fix(capture): every process registers every table before its first query

The models now live in their units' packages, and a core model names a unit's by
string (User.subscriptions -> Subscription). The download child imports neither
catalog nor app.tables before db.get, so mapper configuration failed and every
download, clip, edit and upload job died with child_exit. Each entry point now
imports app.tables, and a test imports each one in a clean interpreter.
This commit is contained in:
2026-10-20 00:45:20 +02:00
parent 5ce292cd28
commit d73cdcee97
5 changed files with 67 additions and 0 deletions
+1
View File
@@ -31,6 +31,7 @@ from functools import partial
from sqlalchemy import text
from sqlalchemy.orm import Session
import app.tables # noqa: F401 — every table, before the first query
from app import logs
from app import logsink
from app import sysconfig