Back

Background data export


Hi all, just wondering how you normally handle situations where you've to generate PDF or csv documents from your app with a large amount of data? I'd like to background the task and notify the user when the export has been completed. Right now I'm thinking that I'll pop the job on to a queue and use Pusher to notify the user when it's complete with a link to download but I was wondering if there's a simpler solution I'm overlooking.

Thanks, Niall.

mattstauffer replied 3 years ago Solution

That's what I do (queue & pusher).

Or, if I'm being too cheap for Pusher, I just have a web hook from whatever's processing the queue that notifies my app that it's done along with a message to the user with a link to the download, and then users' browsers ping the app with AJAX every 20-60 seconds for a new message.

niallobrien replied 3 years ago

Thanks for replying Matt, good to know I'm on the right track.

Niall.

Phearin SOK replied 1 week ago

Hi niallobrien, I'm in the same situation as yours and kind of new to the queue and pusher (web socket) things. I'm currently coding on queue for the data export but the queue seems not working. Could you provide the sample code for the implementation? Thank you.


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us