We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c32b9c9 commit 8951a29Copy full SHA for 8951a29
frameworks/Ruby/rage/config/initializers/activerecord.rb
@@ -2,16 +2,7 @@
2
3
require "etc"
4
5
-connection = {
6
- adapter: "postgresql",
7
- host: "tfb-database",
8
- username: "benchmarkdbuser",
9
- password: "benchmarkdbpass",
10
- database: "hello_world",
11
- reaping_frequency: 0,
12
- pool: (2 * Math.log(256 / Etc.nprocessors)).floor
13
-}
+pool_size = (2 * Math.log(256 / Etc.nprocessors)).floor
+puts "ActiveRecord pool size: #{pool_size}"
14
15
-puts "ActiveRecord connection options: #{connection.inspect}"
16
-
17
-ActiveRecord::Base.establish_connection(connection)
+ENV["DATABASE_URL"]="postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world?pool=#{pool_size}&reaping_frequency=0"
0 commit comments