Skip to content

Instantly share code, notes, and snippets.

@mudge
mudge / stats.rb
Created December 15, 2010 16:05 — forked from asim/stats.rb
class Stats
QUEUES = [:bounced, :connect, :conversations, :deferred, :host, :lost, :sent]
def self.lookup(pattern)
keys = REDIS.keys(pattern)
REDIS.mapped_mget(*keys)
end
def self.day_for(ip)
# method should return a hash of count queues for 24 hours