diff --git a/shared/infrastructure/factory.py b/shared/infrastructure/factory.py index ce99672..c1c9298 100644 --- a/shared/infrastructure/factory.py +++ b/shared/infrastructure/factory.py @@ -48,6 +48,7 @@ def create_base_app( before_request_fns: Sequence[Callable[[], Awaitable[None]]] | None = None, domain_services_fn: Callable[[], None] | None = None, no_oauth: bool = False, + no_db: bool = False, ) -> Quart: """ Create a Quart app with shared infrastructure. @@ -111,7 +112,8 @@ def create_base_app( # --- infrastructure --- register_middleware(app) - register_db(app) + if not no_db: + register_db(app) register_redis(app) setup_jinja(app) setup_sx_bridge(app) diff --git a/sx/app.py b/sx/app.py index 5d19739..dca9ab2 100644 --- a/sx/app.py +++ b/sx/app.py @@ -58,6 +58,7 @@ def create_app() -> "Quart": extra_kw = {} if SX_STANDALONE: extra_kw["no_oauth"] = True + extra_kw["no_db"] = True app = create_base_app( "sx",