I have a custom recipe that is updating my database.yml file after the sidekiq recipe runs so my database.yml file has pool: #{node['sidekiq']['concurrency']+2}. Before this change I would get frequent ActiveRecord::ConnectionTimeoutError errors.
Im my case, my custom recipe is using sed to find a replace pool: 5 with pool: 7.
command "sed -ibak --follow-symlinks 's/pool: #{node['sidekiq']['concurrency']}/pool: #{(node['sidekiq']['concurrency']+2)}/g' #{db_yaml_file}"
Can this change be made in the main sidekiq recipe so I don't have to have a custom recipe?
Two lines need to be updated:
|
command "sed -ibak --follow-symlinks 's/reconnect/pool: #{node['sidekiq']['concurrency']}\\\n reconnect/g' #{db_yaml_file}" |
|
only_if "test -f #{db_yaml_file} && ! grep 'pool: *#{node['sidekiq']['concurrency']}' #{db_yaml_file}" |
I have a custom recipe that is updating my database.yml file after the sidekiq recipe runs so my database.yml file has
pool: #{node['sidekiq']['concurrency']+2}. Before this change I would get frequent ActiveRecord::ConnectionTimeoutError errors.Im my case, my custom recipe is using sed to find a replace
pool: 5withpool: 7.command "sed -ibak --follow-symlinks 's/pool: #{node['sidekiq']['concurrency']}/pool: #{(node['sidekiq']['concurrency']+2)}/g' #{db_yaml_file}"Can this change be made in the main sidekiq recipe so I don't have to have a custom recipe?
Two lines need to be updated:
ey-cookbooks-stable-v5/cookbooks/sidekiq/recipes/setup.rb
Line 44 in ca3fa18
ey-cookbooks-stable-v5/cookbooks/sidekiq/recipes/setup.rb
Line 46 in ca3fa18