3

So I am trying to use datamapper inside my Rails 3.2.8 app.

I have a config/initializers/dm.rb where I load the database.yml

hash = YAML.load(File.new("database.yml"))
DataMapper.setup(:default, hash[Rails.env])

I have a pool property set in the database.yml file, but I noticed that datamapper does not use that. It has this magic number 8 which it uses, where is this number coming from? And how can I configure pool settings for datamapper.

kapso
  • 11,703
  • 16
  • 58
  • 76

1 Answers1

0

just after DataMapper.finalize I add this for my tests ( with 'sqlite3::memory:' ) to reduce the poolsize to 1

class DataObjects::Pooling::Pool
  alias :initialize_old :initialize
  def initialize(max_size, resource, args)
    initialize_old( 1, resource, args)
  end
end
kristian
  • 21
  • 3