blitz_api/app/api
fusion44 868457ffa5
fix(api): replace deprecated asyncio.get_event_loop()
get_event_loop() is deprecated on Python 3.11+ when there is no running
loop and is slated to change behaviour further.

- SSEManager.setup() ran at import time (app.api.utils) via
  get_event_loop(); this only worked because uvicorn imports the app
  inside its loop and would break when imported without a running loop
  (e.g. a Celery worker). Start the broadcast consumer lazily from
  within a running loop instead.
- everywhere else the pattern was get_event_loop().create_task(x)
  inside a coroutine; replace with asyncio.create_task(x).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 22:34:44 +02:00
..
error_report chore: clean up imports; add better LND error logging 2026-02-03 11:05:19 +01:00
__init__.py refactor: switch to domain driven directory layout 2022-10-03 20:22:00 +02:00
channel.py chore: clean up imports; add better LND error logging 2026-02-03 11:05:19 +01:00
config.py chore: small fixes and updates 2025-05-06 09:16:46 +02:00
constants.py feat: prepare for release 0.5.1beta 2023-02-05 21:24:31 +01:00
models.py refactor: code cleanup 2025-05-06 09:16:46 +02:00
sse_manager.py fix(api): replace deprecated asyncio.get_event_loop() 2026-07-03 22:34:44 +02:00
task_utils.py feat: implement (un)install celery task 2025-05-06 09:16:46 +02:00
utils.py fix(api): replace deprecated asyncio.get_event_loop() 2026-07-03 22:34:44 +02:00
warmup.py fix: send bitcoin-only warmup app status as app_state_update_message 2026-07-03 15:30:17 +02:00