Is there any way to change or prevent the default call to
I was expecting to find it in
config/application.rb or an env specific configuration file, but I can’t find it.
What is the proper way to customize the behavior?
I need something similar to this:
if ENV['PROCNAME'] == 'worker-without-db' # do not connect to db else ActiveRecord::Base.establish_connection = "my database" end
In this way I could prevent the call to
establish_connection for a large number of sidekiq processes that never need DB access (in order to avoid hundreds of useless DB connections).