How would you handle third party subscriptions in convex
Hi, I am using convex and trigger to do background task processing and I am looking at trigger's realtime SDK. In some bit of code, they 'subscribe' to changes to the task run like in this example they gave. Was wondering is this safe to do in a convex action? Or would it cause the action to hang indefinitely or eat up a lot of bandwidth? Any advice is very much appreciated thank you!
link to the docs: https://trigger.dev/docs/realtime/overview
3 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
As long as it uses
fetch
or you have "use node", i think this would work. Two caveats: actions have a 10 minute timeout https://docs.convex.dev/production/state/limits#execution-time-and-scheduling , and every second waiting counts towards Action Compute pricing https://www.convex.dev/pricing
This doesn't sound like a cheap or efficient method. If you could get Trigger.dev to send a webhook to a convex action, that sounds better. Or you could consider doing all of the stuff in Convex 🙂Limits | Convex Developer Hub
We’d love for you to have unlimited joy building on Convex but engineering
ah that's what I thought, some of the things I want to do are heavy compute like video/image processing so i thought it might be better to do outside convex and send the result back
thanks for the clarification @Lee first time seeing a pattern like this so was wondering if it was something I was unaware about