Hi this works great! Thanks, I'll update merb_sequel with this and if
you don't mind I'll put your email to contributors.

Pavel

On Mar 3, 9:05 am, e-mac <[email protected]> wrote:
> On Mar 3, 7:53 am, Pavel Kunc <[email protected]> wrote:
>
> > Please keep in mind that there is problem with merb/merb_sequel or pg
> > gem causing infinite loop when Merb reloads after saving file for
> > example.
>
> > Details:http://groups.google.com/group/merb/browse_thread/thread/baac11918f7b...
>
> Probably a merb_sequel problem.
> Merb::Orms::Sequel::DisconnectBeforeFork does not work as expected.
>
> Here is my workaround (in development.rb):
>
> class Merb::BootLoader::DisconnectBeforeStartTransaction <
> Merb::BootLoader
>   before LoadClasses
>   def self.run
>     if Merb::Config[:fork_for_class_load] && !Merb.testing?
>       Merb.logger.debug "Disconnecting database connection before
> starting transaction."
>       ::Sequel::DATABASES.each { |db| db.disconnect }
>     end
>   end
> end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to