Skip event processor in standalone mode (no DB for LISTEN/NOTIFY)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m28s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m28s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user