Commit graph

1 commit

Author SHA1 Message Date
victorcavero14
497de58a1f fix(api): upload to Upload-Post off the event loop
/api/social/post and the AI Shorts post sent the clip with a sync
httpx.Client inside an async handler, so the whole API froze for the
length of the upload. 23-sep-2026 19:47:48 UTC: one TikTok+YouTube post
stalled every request, /health included, for 42 s and the uptime monitor
paged "openshorts-api down" for 2 min. Both uploads (and the actor image
fetch in saasshorts_generate) now run through asyncio.to_thread; an AST
test rejects blocking httpx/requests calls inside async defs in app.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 00:37:02 +02:00