Background job with status in rails
Posted
by pepernik
on Stack Overflow
See other posts from Stack Overflow
or by pepernik
Published on 2010-03-25T17:15:23Z
Indexed on
2010/04/29
4:47 UTC
Read the original article
Hit count: 354
Hey. I would like to upload a file and then parse it. Because parsing can take up to 10min I installed delayed_job plugin and called parsing function through send_later function. I have to mention that this is an AJAX app.
Imagine that you press an AJAX button that starts upload and after that the source is imported into the database. During the process I want to show the progress bar or message (importing...) and when it completes the task status changes to done.
My question is: What is the best way to check for status of the process. What would you do? My idea is to have another controller actions "status" which look into the database and provide the right status.
© Stack Overflow or respective owner