Skip to content

Instantly share code, notes, and snippets.

@phuongnd08
Created April 8, 2015 07:32
Show Gist options
  • Save phuongnd08/c3f97c1d847c7d0274c3 to your computer and use it in GitHub Desktop.
Save phuongnd08/c3f97c1d847c7d0274c3 to your computer and use it in GitHub Desktop.
REDIS_WEBSOCKET_URL = ENV['REDIS_WEBSOCKET'] || "redis://localhost:6379/0"
REDIS_SIDEKIQ_URL = ENV['REDIS_SIDEKIQ'] || "redis://localhost:6379/0"
Redis.current = Redis.new(url: REDIS_SIDEKIQ_URL, driver: :hiredis)
require_relative "redis"
Sidekiq.configure_server do |config|
config.redis = { url: REDIS_SIDEKIQ_URL }
end
Sidekiq.configure_client do |config|
config.redis = { url: REDIS_SIDEKIQ_URL }
end
require_relative "redis"
SocketIo.redis = Redis.new(url: REDIS_WEBSOCKET_URL, driver: :hiredis)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment