Class: Merb::BootLoader::DisconnectBeforeStartTransaction
- Inherits:
-
Merb::BootLoader
- Object
- Merb::BootLoader
- Merb::BootLoader::DisconnectBeforeStartTransaction
- Defined in:
- lib/merb_sequel.rb
Overview
Disconnects from DB before starting reloading classes
There is a problem with the pg gem driver wich causes infinite loop duing reloading process.
Disconnect only when fork_for_class_relaod is set and we’re not in testing mode.
Class Method Summary collapse
Class Method Details
.run ⇒ Object
36 37 38 39 40 41 |
# File 'lib/merb_sequel.rb', line 36 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 |