Module: Status

Defined in:
lib/city_watch/util/status.rb

Instance Method Summary collapse

Instance Method Details

#set_status_var(var, val, host = host) ⇒ Object



3
4
5
# File 'lib/city_watch/util/status.rb', line 3

def set_status_var(var,val,host=host)
	CityWatch.redis.hset "#{CityWatch.config[:prefix]}::#{host}::#{self.name}::status", var, val
end

#status_var(var, host = host) ⇒ Object



11
12
13
# File 'lib/city_watch/util/status.rb', line 11

def status_var(var,host=host)
	CityWatch.redis.hget "#{CityWatch.config[:prefix]}::#{host}::#{self.name}::status", var
end

#status_vars(host = host) ⇒ Object



7
8
9
# File 'lib/city_watch/util/status.rb', line 7

def status_vars(host=host)
	CityWatch.redis.hgetall "#{CityWatch.config[:prefix]}::#{host}::#{self.name}::status"
end