Even simpler. Use ruby 'fork' method. Example:

#show time now
puts Time.now
fork do
  #long running process
`sleep 20;curl -O www.somesite.com/bigfile.tgz`
end
#this time is nearly same as when we started, no delay
puts Time.now



On Sep 27, 4:59 pm, Craig White <[EMAIL PROTECTED]> wrote:
> On Sat, 2008-09-27 at 17:48 +0200, Max Williams wrote:
> > This is probably a general ruby question:  in one of my models i need to
> > make loads (up to 600 or so) of system calls with the curl command.
> > It's a fire-and-forget kind of deal - i don't care, at that particular
> > moment, whether the calls were successful or not and i certainly don't
> > want to keep the user waiting for the html responses to come back.
>
> > Is it possible, with a call to 'system' (or some other method) to carry
> > on without waiting for the results?
>
> ----
> backgroundrb
>
> Craig
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to