Skip to content

Instantly share code, notes, and snippets.

@smathy
Last active December 22, 2015 20:59
Show Gist options
  • Save smathy/6530475 to your computer and use it in GitHub Desktop.
Save smathy/6530475 to your computer and use it in GitHub Desktop.
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