lib/karafka/base_worker.rb in karafka-sidekiq-backend-1.1.0.alpha1 vs lib/karafka/base_worker.rb in karafka-sidekiq-backend-1.1.0

- old
+ new

@@ -8,12 +8,10 @@ # Executes the logic that lies in #perform Karafka controller method # @param topic_id [String] Unique topic id that we will use to find a proper topic # @param params_batch [Array] Array with messages batch def perform(topic_id, params_batch) Karafka.monitor.notice(self.class, params_batch) - instance = controller(topic_id, params_batch) - # This allows to support both Karafka 1.0 and 1.1 - instance.respond_to?(:consume) ? instance.consume : instance.perform + controller(topic_id, params_batch).consume end private # @return [Karafka::Controller] descendant of Karafka::BaseController that matches the topic