lib/rabbit/event_handler.rb in rabbit_messaging-1.0.0 vs lib/rabbit/event_handler.rb in rabbit_messaging-1.1.0

- old
+ new

@@ -10,15 +10,24 @@ attribute :data attribute :message_info class_attribute :queue class_attribute :ignore_queue_conversion, default: false + class_attribute :additional_job_configs, default: {} class << self private def queue_as(queue = nil, &block) self.queue = queue || block + end + + def job_config(**config_opts) + additional_job_configs.merge!(config_opts) + end + + def job_configs(**config_opts) + self.additional_job_configs = config_opts end end def initialize(message) self.attributes = message.data