Class: Fuey::Reporters::Redis

Inherits:
Object
  • Object
show all
Defined in:
lib/fuey_client/fuey/reporters/redis.rb

Instance Method Summary collapse

Instance Method Details

#redisObject



8
9
10
11
12
# File 'lib/fuey_client/fuey/reporters/redis.rb', line 8

def redis
  @@redis ||= ::Redis.new(
                          :host => Config::Redis.host,
                          :port => Config::Redis.port )
end

#update(channel, message) ⇒ Object

Handles update from observable



15
16
17
# File 'lib/fuey_client/fuey/reporters/redis.rb', line 15

def update(channel, message)
  redis.publish channel, message.to_json
end