Last active
December 22, 2015 20:59
-
-
Save smathy/6530475 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sidekiq | |
class AV_lb1 < Web; include Sidekiq; end | |
class AV_lb2 < Web; include Sidekiq; end | |
class AV_lb3 < Web; include Sidekiq; end | |
end | |
%w/lb1 lb2 lb3/.each do |node_name| | |
cls = "Sidekiq::AV_#{node_name}".constantize | |
cls.configure_client do |config| | |
config.redis = { url: "redis://live.av_#{node_name}", namespace: "av", size: 1 } | |
end | |
map "/sidekiq/#{node_name}" do | |
run cls | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment