Skip to content

Instantly share code, notes, and snippets.

@hakanensari
Created July 21, 2013 20:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hakanensari/9a7185f24e00c458f3e7 to your computer and use it in GitHub Desktop.
Save hakanensari/9a7185f24e00c458f3e7 to your computer and use it in GitHub Desktop.
# config/initializers/sidekiq.rb
if Sidekiq.server?
config = ActiveRecord::Base.connection.pool.spec.config
ActiveRecord::Base.establish_connection(config.merge(pool: Sidekiq.options.fetch(:concurrency)))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment