Sha256: 7a4aa25353f56da4746dda0fce554f3ef41137280a2208e9542e51bb831f6900

Contents?: true

Size: 385 Bytes

Versions: 2

Compression:

Stored size: 385 Bytes

Contents

require 'connection_pool'

REDIS = ConnectionPool.new(size: 5) do
  if ENV['REDISTOGO_URL']
    puts "---> using redis to go!"
    uri = URI.parse(ENV["REDISTOGO_URL"])
    puts "---> parsed uri: #{uri}"
    Redis.new(:host => uri.host, :port => uri.port, :password => uri.password, :thread_safe => true)
  else
    puts "---> using default redis settings..."
    Redis.new
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
metacosm-0.3.4 lib/metacosm/redis.rb
metacosm-0.3.3 lib/metacosm/redis.rb