Class: Occurro::Jobs::Resque

Inherits:
Object
  • Object
show all
Defined in:
lib/occurro/jobs/resque.rb

Class Method Summary collapse

Class Method Details

.perform(countable_type, countable_id, count = 1) ⇒ Object

Performs an async increment of the counter



7
8
9
10
# File 'lib/occurro/jobs/resque.rb', line 7

def self.perform(countable_type, countable_id, count = 1)
  model = countable_type.constantize.find countable_id
  Occurro::Counter.increment_counters(model, count)
end