Class: QueueBus::Worker
- Inherits:
-
Object
- Object
- QueueBus::Worker
- Defined in:
- lib/queue_bus/worker.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#perform(json) ⇒ Object
all our workers include this one.
Class Method Details
.perform(json) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/queue_bus/worker.rb', line 4 def self.perform(json) klass = nil attributes = ::QueueBus::Util.decode(json) begin class_name = attributes["bus_class_proxy"] klass = ::QueueBus::Util.constantize(class_name) rescue NameError # not there anymore return end klass.perform(attributes) end |
Instance Method Details
#perform(json) ⇒ Object
all our workers include this one
19 20 21 22 |
# File 'lib/queue_bus/worker.rb', line 19 def perform(json) # instance method level support for sidekiq self.class.perform(json) end |