Thanks, but this doesn't answer my question at all :). I saw where was it added and I guess I know why it is a better to keep this false by default. My question is if I have a set of rake tasks where I use multiple-threads so I have to turn eager_load on can there be any surprise. I don't think there can be just wanted to hear the opinion of someone from the core team.
On Friday, March 7, 2014 11:14:27 AM UTC+1, Gergo Erdosi wrote: > > Hi Greg, > > Here is the related ticket for that change: > https://github.com/rails/rails/issues/11381 > > -- > Gergo Erdosi > > > On Fri, Mar 7, 2014 at 9:13 AM, Greg Molnar <[email protected]<javascript:> > > wrote: > >> Hi Guys, >> >> Is there a reason why the eager_load option is hardcoded to false for the >> rake tasks? >> >> https://github.com/rails/rails/blob/master/railties/lib/rails/application.rb#L344 >> >> I am in a situation when I need to turn that on for an import rake tasks >> which would take ages without multithreading but with multiple threads my >> code has race conditions with eager_load=false. In the moment my task is >> just not depending on the environment task rather I load the environment in >> that task. It all works well but the fact this value is hardcoded makes me >> think maybe there is something I am not aware of and it can cause problems >> later. >> So my question is: Is that option false just for performance reasons or >> is there something else I am not aware of? Is it safe to turn eager_load on >> for a rake task?(I guess this is depending on what that task does). >> >> I appreciate any help and advise! >> >> >> Greg >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to >> [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/rubyonrails-core. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.
