1
0
Fork 0

Add files "config/sidekiq_*.yml"

This commit is contained in:
Alex Kotov 2018-12-09 07:47:19 +05:00
parent 8ae2274493
commit fd92017ad1
No known key found for this signature in database
GPG key ID: 4E831250F47DE154
4 changed files with 56 additions and 7 deletions

View file

@ -1 +1 @@
fjnfa6WiV9JAwARGvedJlDNNwBlRV6uGHprrrIudcyX2dO/QyFpKoDGBiIoMT5H1n2srJ6egs8f0tsE6ZE03/XczWh++HWJSmaLxLahSouVVkUzbtmknu1Ra+zrwaAxxPfx44aeFgwEUcGEb/0F/dTpP+G4DTSZ7HreIoG0m08Ei6XU0Cw346d5R/8WrxaCkVvYTKRiNpjC1L4zL8labIkC8o8GemrIc7en/27hFxeMJlexJcZk8SIQEIpMN8K8gEjEjhBgeLJ1K5aEXqxC/Ut0C1adIip4YUnh7lb60APqRmVfFas9jD5hd/V83BSuJCJX3xotyuXpgtd+teIZN58276vHSYp3dUXtyuXyVGaq2/ok1/gNjzjyuR9vnwyD6hBO4N6iC8CWeCli9BybP5qClx+a61VgYcUgBiCKrgeeQlqHPDUvcxovVm5U0ClINR9dGsxR2iY3qFwY0/oKPZyPL3VntYrRhdjJW/N7IrPRZqOBpVdQvxvdUd63medFDhVwoOuAqjJa9EQhOJ9l9zRPAzWvNNKvpCZqiS46/ZsJULDUFqnUjA0ZIo26J4UQreepte9gE97xzOHz/S+E04s4YQVNMxFSuradScWppyAo4cwABCJmhKkTNJ4OCv3qSbiYkx3+BTWJVVVgNVqFjWJRS3QsjnnjHDErOLw3n2lKW2jkA6CPYbkZMQXX6jMSFKG3dJEEVKsPVcV5OnK5/hY5uvg9E64O/19ueZE+a6/Q1+Y5QPQNQQkZPB/QPriIUIgeBiHaEVHF082wxfzvJRTHPKg3L3vTUEgFxwOr9y1lmroq/7otlzgHiG3xzQOvg6qgkje0nI3k9oLNGlxDARcN1FBlqFyJ3JGPmzICFxpH8qmoOkHqHjAnY/W+32J6SaHctZAFaxOihtWOl6yjP4P82m7BA+yhmSb6wzac6f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g+Nq42wnFim6y7/EHeHq4P5Gl/Jdir4voPdGX7weFTYr+8EQOLpqKEN91pQIQDkchVPS7KXbZ6M3rFWhOK2H7auOjwnp3dSJkFflIBQOUc5Oe8tpaoHKv4XCH5RoeEM4q+7PagKW6hx+fPQ/wtFkoEiyePTa9FwCi08z6U9IjsYAYms/GG5sop68kIyuI24MeOrsXgqIGRnvzw3AA6KUlaiNp4PeaSDWD1l9+r+Y+W9NL2Vb+7XEzFZ5uTBeB9z/Ex1LuNQeyRUdtNXv1xnMKVNcjhSB8ZLDjcI8k84N0diCaZmJY2vcXku91awTETSuxw0+sRGC1uYGNzfuUhW6c/FANJWuvDpVuXd76x2OWYoD8pmXPRP826+6IOduobaHj2fAerci5l3VH0ah3JUjxBlEIxTc37jwks5xziln35gM90HQbWLj3OlyaYObNhYhy3DdLgrFiOkmwKN5Q2E/QgTuDo3AlHnBHxs5/gBYXuXpHGWKf+hznI5NfSyWq9MJhY36wRQGkIfSu+vbisfPBqI9+WYTgk8H4tMojjGjwXQgGWz2/wFQ64B+iRlmzu+i2ig3txcG9oXVKnfyIpb/rEsXR2v3vDatkYgn4/q5HPIRZUCGIGtQ==--ktDooP5iU8LKR4Km--5JC1/9bGqyeVQ6TQlGphOQ==

View file

@ -2,14 +2,23 @@
# Be sure to restart your server when you modify this file.
server_conf = Rails.application.config_for(:sidekiq_server).deep_symbolize_keys
client_conf = Rails.application.config_for(:sidekiq_client).deep_symbolize_keys
Sidekiq.configure_server do |config|
Rails.application.credentials.sidekiq_redis_server.try do |redis_config|
config.redis = redis_config.deep_symbolize_keys if redis_config
end
config.redis = {
host: server_conf[:redis_host],
port: server_conf[:redis_port],
db: server_conf[:redis_db],
password: server_conf[:redis_password],
}
end
Sidekiq.configure_client do |config|
Rails.application.credentials.sidekiq_redis_client.try do |redis_config|
config.redis = redis_config.deep_symbolize_keys if redis_config
end
config.redis = {
host: client_conf[:redis_host],
port: client_conf[:redis_port],
db: client_conf[:redis_db],
password: client_conf[:redis_password],
}
end

20
config/sidekiq_client.yml Normal file
View file

@ -0,0 +1,20 @@
default: &default
redis_host: <%= ENV.fetch('SIDEKIQ_CLIENT_REDIS_HOST') { 'localhost' } %>
redis_port: <%= ENV.fetch('SIDEKIQ_CLIENT_REDIS_PORT') { 6379 } %>
unsafe: &unsafe
<<: *default
redis_password: <%= ENV.fetch('SIDEKIQ_CLIENT_REDIS_PASSWORD') { 'password' } %>
development:
<<: *unsafe
redis_db: <%= ENV.fetch('SIDEKIQ_CLIENT_REDIS_DB') { 0 } %>
test:
<<: *unsafe
redis_db: <%= ENV.fetch('SIDEKIQ_CLIENT_REDIS_DB') { 15 } %>
production:
<<: *default
redis_password: <%= Rails.application.credentials.sidekiq_client_redis_password %>
redis_db: <%= ENV.fetch('SIDEKIQ_CLIENT_REDIS_DB') { 0 } %>

20
config/sidekiq_server.yml Normal file
View file

@ -0,0 +1,20 @@
default: &default
redis_host: <%= ENV.fetch('SIDEKIQ_SERVER_REDIS_HOST') { 'localhost' } %>
redis_port: <%= ENV.fetch('SIDEKIQ_SERVER_REDIS_PORT') { 6379 } %>
unsafe: &unsafe
<<: *default
redis_password: <%= ENV.fetch('SIDEKIQ_SERVER_REDIS_PASSWORD') { 'password' } %>
development:
<<: *unsafe
redis_db: <%= ENV.fetch('SIDEKIQ_SERVER_REDIS_DB') { 0 } %>
test:
<<: *unsafe
redis_db: <%= ENV.fetch('SIDEKIQ_SERVER_REDIS_DB') { 15 } %>
production:
<<: *default
redis_password: <%= Rails.application.credentials.sidekiq_server_redis_password %>
redis_db: <%= ENV.fetch('SIDEKIQ_SERVER_REDIS_DB') { 0 } %>