Ben Haynor
2007-Jul-18 20:07 UTC
[Backgroundrb-devel] RMagick progress monitor with backgroundrb - possible?
I''m looking for a way to give the user a progress monitor on large image manipulations with RMagick. I first looked at this method - http://www.imagemagick.org/RMagick/doc/imageattrs.html#monitor - to do it in a controller action, but since I can''t call multiple renders in an action, I would need to store the progress in the database and call another action from javascript to look it up, which seems like overkill(although maybe there is a better way I haven''t thought of?). So, I was wondering if it is possible to do it in a more straightforward way with backgroundrb? Thanks, Ben
Wil Chung
2007-Jul-18 21:06 UTC
[Backgroundrb-devel] RMagick progress monitor with backgroundrb - possible?
If monitor() does what I think it does, then it''s probably possible. You can store the progress in the worker status, and then call an action like "check_status" that asks for the worker''s status. If you were using rails, you would then return an RJS template (or render a partial) to update the page without reloading. To call this action, you can use periodically_remote (or something like that), or write your own javascript that calls the action periodically with javascript''s setInterval(). Wil On 7/18/07, Ben Haynor <ben.haynor at gmail.com> wrote:> > I''m looking for a way to give the user a progress monitor on large > image manipulations with RMagick. I first looked at this method - > http://www.imagemagick.org/RMagick/doc/imageattrs.html#monitor - to do > it in a controller action, but since I can''t call multiple renders in > an action, I would need to store the progress in the database and call > another action from javascript to look it up, which seems like > overkill(although maybe there is a better way I haven''t thought of?). > So, I was wondering if it is possible to do it in a more > straightforward way with backgroundrb? > > Thanks, > Ben > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel >-- http://webjazz.blogspot.com http://www.mobtropolis.com http://www.3cglabs.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070718/528a8e41/attachment.html