Permalink
Browse files

DEPRECATION WARNING: ActiveRecord::Base.verification_timeout= has bee…

…n deprecated and no longer has any effect.

Please remove all references to verification_timeout=..

Cleanup connection to ActiveRecord's connection pool after dispatch.

Signed-off-by: Jack Dempsey <jack.dempsey@gmail.com>
  • Loading branch information...
mlangenberg authored and jackdempsey committed Dec 5, 2008
1 parent 011bfe1 commit 7ec90eebb20a1033daabc4010556e48a37dd745d
@@ -0,0 +1,6 @@
+# This is the default behavior for ActiveRecord when used
+# in conjunction with ActionPack's request handling cycle.
+# TODO write test
+Merb::Controller.after do
+ ActiveRecord::Base.clear_active_connections!
+end
@@ -60,7 +60,6 @@ def connect
Thread.new{ loop{ sleep(60*60); ::ActiveRecord::Base.verify_active_connections! } }
- ::ActiveRecord::Base.verification_timeout = 14400
::ActiveRecord::Base.logger = Merb.logger
::ActiveRecord::Base.configurations = configurations
::ActiveRecord::Base.establish_connection config
@@ -2,6 +2,7 @@
dependency "activerecord"
+ require File.join(File.dirname(__FILE__) / "merb" / "orms" / "active_record" / "cleanup" )
require File.join(File.dirname(__FILE__) / "merb" / "orms" / "active_record" / "connection")
Merb::Plugins.add_rakefiles(File.join(File.dirname(__FILE__) / "active_record" / "merbtasks"))

2 comments on commit 7ec90ee

@dstrelau

This comment has been minimized.

Show comment Hide comment
@dstrelau

dstrelau Dec 17, 2008

Any idea when this fix will be released into the merb_activerecord gem?

Any idea when this fix will be released into the merb_activerecord gem?

@jsmestad

This comment has been minimized.

Show comment Hide comment
@jsmestad

jsmestad Jan 19, 2009

Also wondering this…. ?

Also wondering this…. ?

Please sign in to comment.