Wrangling slow reports, large file exports, and long-running tasks in Rails with ActiveJob
30-Jan-2020 2324
Sometimes we need to generate really large file exports or run reports that are just slow. It’s not enough to optimize a few queries, we need to move the work to a background job and notify the user when it’s all. In every non-trivial application you’ll have to do something that is just slow. You need to export a large data set to a CSV file. An analyst needs a complicated Excel report. Or maybe you have to connect to an external API and process a whole bunch of data.So how do you know when it’s time to use background jobs?If you try building these kinds of reports in a normal Rails controller action, you will see these symptoms:.
Wrangling slow reports, large file exports, and long-running tasks in Rails with ActiveJob #ruby #rubydeveloper #rubyonrails #Wrangling #reports, #large #exports, #long-running #tasks #Rails #ActiveJob #activejob https://rubyonrails.ba/link/wrangling-slow-reports-large-file-exports-and-long-running-tasks-in-rails-with-activejob