Effective PDF Download and Distribution with Cloudflare Workers
Hey,
I am trying to figure out the best way to download a PDF from an external API, save it to an R2 instance, and then send it to all of my users. I am currently using Cloudflare Workers to handle this process, but I'm running into issues with the worker running out of processing time.
Would switching to an unbound worker mode help with this issue? Are there any other suggestions or tips for handling this process effectively and efficiently?
Any input would be greatly appreciated. Thank you!
1 Reply
Sure, give me a sec
its a pretty rough code that used to work with a little amont ouf users, but now its running out of cpu time
let me get a snippet of my code
This is my hanlder function:
and this is my
sendAllClientsAccountStatement
function
It now it's pretty unefficient 🤣
yep, I need to fetch a lot of stuff
Could you roughly explain a basic pipeline with queues?
I see, sounds like a prefect use case for my problem
thanks~
I've been a little hesitant to use queues since they are still in beta
but I;ll give them a try
Nice! Thanks a lot!