Allow to set sidekiq concurrency separately from web workers

Unicorn, which we use to serve the API, uses forked workers that need
only one connection per instance. Sidekiq on the other hand runs several
instances in memory, so it needs a higher concurrency setting. This
commit introduces a way to set sidekiq db pool using
SIDEKIQ_DB_POOL_SIZE
This commit is contained in:
Piotr Sarnacki 2016-03-17 10:57:12 +01:00
parent 55621067cc
commit b68c7a33b0

View File

@ -7,6 +7,7 @@ require 'travis/api/workers/job_cancellation'
require 'travis/api/workers/job_restart'
require 'travis/support/amqp'
Travis.config.database[:pool] = ENV['SIDEKIQ_DB_POOL_SIZE'] || 5
Travis::Database.connect
if Travis.config.logs_database