Sha256: 39b83595f1a658c6a2d10eb72d730ec59ade73d5f35caeddddb19f012675e061
Contents?: true
Size: 491 Bytes
Versions: 7
Compression:
Stored size: 491 Bytes
Contents
module Resque module Plugins class MultiStepTask module AtomicCounters def counter(name) class_eval <<-INCR def increment_#{name} redis.incrby('#{name}', 1) logger.info("[Resque Multi-Step-Task] Incremented #{name}") end INCR class_eval <<-GETTER def #{name} redis.get('#{name}').to_i end GETTER end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems