lib/resque.rb
def redis
    return @redis if @redis

    self.redis = if Redis.respond_to?(:connect)
      Redis.connect(:thread_safe => true)
    else
      "localhost:6379"
    end
  end
# Returns the current Redis connection. If none has been created, will
# create a new one.
Returns the current Redis connection. If none has been created, will
create a new one.
Returns the current Redis connection . If none has been created will create a new one .
def redis
    return @redis if @redis
    self.redis = if Redis.respond_to?(:connect)
      Redis.connect(:thread_safe => true)
    else
      "localhost:6379"
    end
  end
def redis return @redis if @redis self . redis = if Redis . respond_to? ( :connect ) Redis . connect ( :thread_safe => true ) else "localhost:6379" end end
Returns the current Redis connection.
Returns the current Redis connection .