Sha256: 278c7c71a2bf9c6f07568d034d17ace8f051bd6c072e07cfbe22c33d0f5fa14f

Contents?: true

Size: 931 Bytes

Versions: 55

Compression:

Stored size: 931 Bytes

Contents

redis_url = ENV["REDIS_URL"].present? ?  ENV["REDIS_URL"] : defined?(Rails.application.secrets.redis) ? Rails.application.secrets.redis : 'redis://localhost:6379/1'
resque_url = ENV["RESQUE_URL"].present? ?  ENV["RESQUE_URL"] : defined?(Rails.application.secrets.resque) ? Rails.application.secrets.resque : 'redis://localhost:6379/1'
if defined?(Redis.current)
  Redis.current = Redis.new(:id => "#{ZuoraConnect::Telegraf.full_process_name(process_name: 'Redis')}", :url => redis_url, :timeout => 10, :reconnect_attempts => 2)
  if defined?(Resque.redis)
    Resque.redis = resque_url != redis_url ? Redis.new(:id => "#{ZuoraConnect::Telegraf.full_process_name(process_name: 'Resque')}", :url => resque_url, :timeout => 10, :reconnect_attempts => 2) : Redis.current
  end
end
if defined?(RedisBrowser)
  RedisBrowser.configure("connections" => { 
  	"Redis" => { "url" => redis_url },
  	"Resque" => { "url" => resque_url }})
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
zuora_connect-1.7.76 config/initializers/redis.rb
zuora_connect-1.7.75 config/initializers/redis.rb
zuora_connect-1.7.74 config/initializers/redis.rb
zuora_connect-1.7.73 config/initializers/redis.rb
zuora_connect-1.7.72 config/initializers/redis.rb
zuora_connect-1.7.711 config/initializers/redis.rb
zuora_connect-1.7.710 config/initializers/redis.rb
zuora_connect-1.7.71 config/initializers/redis.rb
zuora_connect-1.7.70 config/initializers/redis.rb
zuora_connect-1.7.69 config/initializers/redis.rb
zuora_connect-1.7.68 config/initializers/redis.rb
zuora_connect-1.7.67 config/initializers/redis.rb
zuora_connect-1.7.66 config/initializers/redis.rb
zuora_connect-1.7.65 config/initializers/redis.rb
zuora_connect-1.7.64 config/initializers/redis.rb
zuora_connect-1.7.63 config/initializers/redis.rb
zuora_connect-1.7.62 config/initializers/redis.rb
zuora_connect-1.7.61 config/initializers/redis.rb
zuora_connect-1.7.60 config/initializers/redis.rb
zuora_connect-1.7.59 config/initializers/redis.rb