jhaagmans a écrit, le 11/20/2009 12:41 PM : > I haven't had a chance to test Conrad's suggestion, but I've also seen > that I reach the connection limit for ActiveRecord. Is there a way to > do, for example: > > hosts.each do |host| > #Do all kinds of stuff to host > end > hosts.save > > So I don't have alot of concurrent connections to my database? >
Are you using threads in the block ? If not, even if you use host.save in the block and not a single commit at the end, there's only one connection to the database. Lionel -- 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 [email protected]. 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=.

