Coordinating a web app with an external workflow runner: callbacks vs polling task runs?

Offloading fan-out work to Render Workflows (docs linked above). Retries and parallel tasks live there. My problem is the web layer. First version: return 202, tasks POST back to /internal/events with a bearer token, UI subscribes over SSE. Added a reconciler that polls the Render API every 2s anyway because I didn't trust callbacks alone. Second version: skip callbacks entirely. One POST stays open, poll getTaskRun every 1.5s in an async generator, stream SSE until the digest finishes. Postgres at the end.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论