Class: Taskinator::RedisConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/taskinator/redis_connection.rb

Class Method Summary collapse

Class Method Details

.create(options = {}) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/taskinator/redis_connection.rb', line 22

def create(options={})
  url = options[:url] || determine_redis_provider
  if url
    options[:url] = url
  end

  pool_size = options[:pool_size] || 5
  pool_timeout = options[:pool_timeout] || 1

  log_info(options)

  ConnectionPool.new(:timeout => pool_timeout, :size => pool_size) do
    build_client(options)
  end
end