From 6aaa25a099a457e96001701460578777fb45b22a Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Thu, 17 Mar 2016 11:45:46 +0100 Subject: [PATCH] Overwrite database pool size for logs database Logs database config is set in travis keychain and is set to a concurrency much higher than what we set in heroku config. I don't want to change it globally, because it may need to be different for other apps, so I'm changing it here just before we connect to the db. --- lib/travis/api/app.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/travis/api/app.rb b/lib/travis/api/app.rb index edc64310..25af74ba 100644 --- a/lib/travis/api/app.rb +++ b/lib/travis/api/app.rb @@ -199,6 +199,9 @@ module Travis::Api Travis::Database.connect if Travis.config.logs_database + pool_size = ENV['DATABASE_POOL_SIZE'] + Travis.config.logs_database[:pool] = pool_size if pool_size + Log.establish_connection 'logs_database' Log::Part.establish_connection 'logs_database' end