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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user