Skip DB registration in standalone mode (fixes sx-web.org startup)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m5s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m5s
The sx app is stateless — no database needed. In standalone mode (SX_STANDALONE=true), the factory now skips register_db() so the app doesn't crash trying to connect to a non-existent PostgreSQL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user