diff --git a/Gemfile.lock b/Gemfile.lock index c687df8..da67f7a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rabbit_carrots (0.1.3) + rabbit_carrots (0.1.4) activesupport (>= 6.0.0) bunny (>= 2.19.0) connection_pool (~> 2.3.0) diff --git a/lib/rabbit_carrots/tasks/rmq.rake b/lib/rabbit_carrots/tasks/rmq.rake index 6754813..55519c9 100644 --- a/lib/rabbit_carrots/tasks/rmq.rake +++ b/lib/rabbit_carrots/tasks/rmq.rake @@ -5,7 +5,10 @@ namespace :rmq do task subscriber: :environment do Rails.application.eager_load! - channels = RabbitCarrots::Configuration.routing_key_mappings + channels = RabbitCarrots::Configuration.routing_key_mappings.map do |mapping| + # This will be supplied in initializer. At that time, the Handler will not be available to be loaded and will throw Uninitialized Constant + { **mapping, handler_class: mapping[:handler_class].constantize } + end Rails.logger = Logger.new($stdout) diff --git a/lib/rabbit_carrots/version.rb b/lib/rabbit_carrots/version.rb index be34e0b..64d7d64 100644 --- a/lib/rabbit_carrots/version.rb +++ b/lib/rabbit_carrots/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module RabbitCarrots - VERSION = "0.1.3" + VERSION = "0.1.4" end