From c43f774992022451dcfab5ea10becdd609b0c741 Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 5 Mar 2026 17:02:05 +0000 Subject: [PATCH] Skip event processor in standalone mode (no DB for LISTEN/NOTIFY) Co-Authored-By: Claude Opus 4.6 --- shared/infrastructure/factory.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/shared/infrastructure/factory.py b/shared/infrastructure/factory.py index c1c9298..a9d2864 100644 --- a/shared/infrastructure/factory.py +++ b/shared/infrastructure/factory.py @@ -366,7 +366,7 @@ def create_base_app( return await base_context() # --- event processor --- - _event_processor = EventProcessor(app_name=name) + _event_processor = None if no_db else EventProcessor(app_name=name) # --- startup --- @app.before_serving @@ -375,11 +375,13 @@ def create_base_app( register_shared_handlers() await init_config() print(pretty()) - await _event_processor.start() + if _event_processor: + await _event_processor.start() @app.after_serving async def _stop_event_processor(): - await _event_processor.stop() + if _event_processor: + await _event_processor.stop() from shared.infrastructure.auth_redis import close_auth_redis await close_auth_redis()