lib/shoryuken/options.rb in shoryuken-6.2.0 vs lib/shoryuken/options.rb in shoryuken-6.2.1

- old
+ new

@@ -65,13 +65,17 @@ case strategy when 'WeightedRoundRobin', nil # Default case Polling::WeightedRoundRobin when 'StrictPriority' Polling::StrictPriority + when String + begin + Object.const_get(strategy) + rescue NameError + raise ArgumentError, "#{strategy} is not a valid polling_strategy" + end when Class strategy - else - raise ArgumentError, "#{strategy} is not a valid polling_strategy" end end def delay(group) groups[group].to_h.fetch(:delay, options[:delay]).to_f