lib/qpush/web/apis/stats.rb in qpush-0.1.4 vs lib/qpush/web/apis/stats.rb in qpush-0.1.6
- old
+ new
@@ -26,11 +26,11 @@
end
private
def retrieve_stats
- @stats = QPush.redis.with do |conn|
+ @stats = Web.redis do |conn|
conn.hgetall(QPush.keys.stats)
end
end
def apply_defaults
@@ -46,10 +46,10 @@
def calculate_success
(100.00 - ((@stats['failed'].to_f / @stats['performed'].to_f) * 100.00)).round(2)
end
def calculate_current
- QPush.redis.with do |c|
+ Web.redis do |c|
QPush.keys.perform_lists.collect { |list| c.llen(list) }.reduce(:+)
end
end
end
end