Sha256: 2d4b549b6ee0e4b61ee58ada8ed6e53bf54dc2e258af076d3c4b95799ffc7cef
Contents?: true
Size: 624 Bytes
Versions: 8
Compression:
Stored size: 624 Bytes
Contents
# frozen_string_literal: true module QueueBus class Worker 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 QueueBus.worker_middleware_stack.run(attributes) do klass.perform(attributes) end end # all our workers include this one def perform(json) # instance method level support for sidekiq self.class.perform(json) end end end
Version data entries
8 entries across 8 versions & 1 rubygems