Skip to content

Commit

Permalink
fix DEPRECATION WARNING: ActiveRecord::Base.allow_concurrency=
Browse files Browse the repository at this point in the history
Signed-off-by: Hemant Kumar <gethemant@gmail.com>
  • Loading branch information
eyvoro authored and gnufied committed Jul 3, 2009
1 parent 43d025b commit 707289a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion script/load_worker_env.rb
Expand Up @@ -19,7 +19,11 @@

if !(::Packet::WorkerRunner::WORKER_OPTIONS[:worker_env] == false)
require RAILS_HOME + "/config/environment"
ActiveRecord::Base.allow_concurrency = true
if(Object.const_defined?(:Rails) && Rails.version < "2.2.2")
ActiveRecord::Base.allow_concurrency = true
elsif(Object.const_defined?(:RAILS_GEM_VERSION) && RAILS_GEM_VERSION < "2.2.2")
ActiveRecord::Base.allow_concurrency = true
end
end
require "backgroundrb_server"

0 comments on commit 707289a

Please sign in to comment.