Reputation: 47482
I have an issue of Time out error when i click on the Export to Excel
link in my application, due to heavy db transactions.
I want to change this functionality to the background so that user able to move forward while background process runs.
I want when user clicks on Export to Excel
link background/new thread process runs and an email is sent to the user with a link to download a file.
I want to know which is best way to achieve this Creating new thread or Background process?
Thanks in Advance
Upvotes: 5
Views: 2075
Reputation: 5914
There are three types of messages queues,
I haven't used resque, but heard that it is bit complicated to configure. Apart from running tasks in background, if you want to run some repetitive task on regular intervals, you can go for backgroundrb. Otherwise delayed job will be right choice.
Upvotes: 0
Reputation: 11687
You may want to use https://github.com/defunkt/resque or https://github.com/collectiveidea/delayed_job.
You can also watch:
http://railscasts.com/episodes/271-resque
http://railscasts.com/episodes/171-delayed-job-revised
http://railscasts.com/episodes/171-delayed-job (old one of above but free - but it is worth to buy a subscription)
Upvotes: 3