# File lib/resque/data_store.rb, line 321 def initialize(redis) @redis = redis end
# File lib/resque/data_store.rb, line 336 def clear_stat(stat) @redis.del("stat:#{stat}") end
# File lib/resque/data_store.rb, line 332 def decremet_stat(stat, by = 1) @redis.decrby("stat:#{stat}", by) end
# File lib/resque/data_store.rb, line 328 def increment_stat(stat, by = 1) @redis.incrby("stat:#{stat}", by) end
# File lib/resque/data_store.rb, line 324 def stat(stat) @redis.get("stat:#{stat}").to_i end