module Resque::Stat
def <<(stat)
def <<(stat) incr stat end
def >>(stat)
def >>(stat) decr stat end
def [](stat)
def [](stat) get(stat) end
def clear(stat, **opts)
def clear(stat, **opts) data_store.clear_stat(stat, **opts) end
def data_store
def data_store @data_store ||= Resque.redis end
def data_store=(data_store)
def data_store=(data_store) @data_store = data_store end
def decr(stat, by = 1)
Can optionally accept a second int parameter. The stat is then
For a string stat name, decrements the stat by one.
def decr(stat, by = 1) data_store.decrement_stat(stat,by) end
def get(stat)
def get(stat) data_store.stat(stat) end
def incr(stat, by = 1, **opts)
Can optionally accept a second int parameter. The stat is then
For a string stat name, increments the stat by one.
def incr(stat, by = 1, **opts) data_store.increment_stat(stat, by, **opts) end
def redis
def redis warn '[Resque] [Deprecation] Resque::Stat #redis method is deprecated (please use #data_store)' data_store end