Files
celery/server.py
gilesb 2933dc4e05 Fix blocking sync calls in async endpoints
- Wrap verify_token_with_l2 HTTP calls with asyncio.to_thread()
- Wrap Redis load_run/save_run calls with asyncio.to_thread()
- Add _check_celery_task_sync helper to batch Celery backend calls
- Fix list_all_runs/list_all_recipes blocking in listing endpoints
- Fix cache_manager sync calls in discard endpoints
- Fix find_runs_using_content blocking calls

This prevents event loop blocking during L2 auth verification,
Redis operations, and Celery task status checks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 02:52:51 +00:00

155 KiB