Two related fixes for server unresponsiveness:
1. apis/message_task.py: test_message_task is an async endpoint that
called web_hook() synchronously. If the webhook request hangs, this
blocks the entire uvicorn event loop, freezing all HTTP responses.
Changed to await asyncio.to_thread() so the blocking call runs in a
thread pool without stalling the event loop.
2. core/queue/queue.py: the queue worker thread executes tasks with no
timeout. A single hung task blocks all subsequent tasks permanently.
Wrapped task execution in ThreadPoolExecutor with a 600s timeout,
so the worker can recover and process remaining tasks.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>