Hi, I have some tasks that a user initiates from a page. This task might run longer than the browser timeout. What is the best way to deal with this? Thanks Joerg -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Have you looked into the daemons gem? It might possibly fit your need. RSL On 3/28/07, Joerg Diekmann <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Hi, > > > > I have some tasks that a user initiates from a page. This task might run > longer than the browser timeout. > > What is the best way to deal with this? > > Thanks > Joerg > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
http://backgroundrb.rubyforge.org/ On 3/28/07, Russell Norris <rsl-ftMzyaTR+bHNyFkoKTPOtdi2O/JbrIOy@public.gmane.org> wrote:> Have you looked into the daemons gem? It might possibly fit your need. > > RSL > > > On 3/28/07, Joerg Diekmann < > rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > Hi, > > > > > > > > I have some tasks that a user initiates from a page. This task might run > > longer than the browser timeout. > > > > What is the best way to deal with this? > > > > Thanks > > Joerg > > > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks - that looks pretty wikkid. So - what would be a good pattern then? I post the request to run the task, on the server start the task in a new thread, and tell the user that the task is being performed. What would be a good practice to inform the user? Send an email? Have some or other hook to display it on the site again once the task is completed? Looks promising so far, though. Joerg Shawn Roske wrote:> http://backgroundrb.rubyforge.org/-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It depends on what kind of task you are planning on offloading. If it is something the user needs to wait for, perhaps you could provide a progress bar? Otherwise a system message or email when completed should work. Again it depends on what this process is doing and whether it "makes sense". -Shawn On 3/28/07, Joerg Diekmann <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Thanks - that looks pretty wikkid. > > So - what would be a good pattern then? > I post the request to run the task, on the server start the task in a > new thread, and tell the user that the task is being performed. > > What would be a good practice to inform the user? Send an email? Have > some or other hook to display it on the site again once the task is > completed? > > Looks promising so far, though. > > Joerg > > > Shawn Roske wrote: > > http://backgroundrb.rubyforge.org/ > > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Use DRb or Reliable Messaging to communicate with another back-ground process. On Mar 28, 5:21 am, Joerg Diekmann <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > I have some tasks that a user initiates from a page. This task might run > longer than the browser timeout. > > What is the best way to deal with this? > > Thanks > Joerg > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Shawn (and Russell and dysinger) thanks for your help so far. I didn''t realize that I could use a progress bar for this kind of work. Actually not really sure how they work - do they poll the server every few seconds? Can I use a progress bar with Mongrel? Are there plugins/AJAX widgets for progress bars that would be recommended for long running tasks (in conjunction with bDRb)? Thanks so much! Joerg Shawn Roske wrote:> It depends on what kind of task you are planning on offloading. If it > is something the user needs to wait for, perhaps you could provide a > progress bar? Otherwise a system message or email when completed > should work. Again it depends on what this process is doing and > whether it "makes sense". > > -Shawn-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---