lib/qpush/web/apis/stats.rb in qpush-0.1.7 vs lib/qpush/web/apis/stats.rb in qpush-0.1.8
- old
+ new
@@ -27,11 +27,11 @@
private
def retrieve_stats
@stats = Web.redis do |conn|
- conn.hgetall(Web.keys.stats)
+ conn.hgetall(Web.keys[:stats])
end
end
def apply_defaults
@stats.each { |k, v| @stats[k] = v.to_i }
@@ -47,10 +47,10 @@
(100.00 - ((@stats['failed'].to_f / @stats['performed'].to_f) * 100.00)).round(2)
end
def calculate_current
Web.redis do |c|
- Web.keys.perform_list.collect { |list| c.llen(list) }.reduce(:+)
+ Web.keys[:perform_list].collect { |list| c.llen(list) }.reduce(:+)
end
end
end
end
end