Sha256: 2a53abc70f81148eec3c8cae127008ff66b714711ffa6e66331216e5d34b309a

Contents?: true

Size: 398 Bytes

Versions: 10

Compression:

Stored size: 398 Bytes

Contents

require 'em-hiredis'

module Weeter
  module Plugins
    module Net
      module Redis
        def create_redis_client
          redis = EM::Hiredis.connect(@config.redis_uri)
          redis.callback { Weeter.logger.info "Connected to Redis" }
          redis.errback { |message| Weeter.logger.err "Failed to connect to Redis: #{message}" }
          redis
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
weeter-0.19.4 lib/weeter/plugins/lib/redis.rb
weeter-0.19.3 lib/weeter/plugins/lib/redis.rb
weeter-0.19.2 lib/weeter/plugins/lib/redis.rb
weeter-0.19.1 lib/weeter/plugins/lib/redis.rb
weeter-0.19.0 lib/weeter/plugins/lib/redis.rb
weeter-0.18.0 lib/weeter/plugins/lib/redis.rb
weeter-0.17.0 lib/weeter/plugins/lib/redis.rb
weeter-0.15.0 lib/weeter/plugins/lib/redis.rb
weeter-0.14.0 lib/weeter/plugins/lib/redis.rb
weeter-0.13.0 lib/weeter/plugins/lib/redis.rb