Method: Resque::Stat#decr
- Defined in:
- lib/resque/stat.rb
#decr(stat, by = 1) ⇒ Object
For a string stat name, decrements the stat by one.
Can optionally accept a second int parameter. The stat is then decremented by that amount.
39 40 41 |
# File 'lib/resque/stat.rb', line 39 def decr(stat, by = 1) redis.decrby("stat:#{stat}", by) end |