lib/rocket_job/throttle_definitions.rb in rocketjob-6.0.0.rc1 vs lib/rocket_job/throttle_definitions.rb in rocketjob-6.0.0.rc2

- old
+ new

@@ -1,8 +1,8 @@ module RocketJob class ThrottleDefinitions - attr_reader :throttles + attr_accessor :throttles def initialize @throttles = [] end @@ -32,8 +32,14 @@ next unless throttle.throttled?(job, *args) return throttle.extract_filter(job, *args) end nil + end + + def deep_dup + new_defination = dup + new_defination.throttles = throttles.map(&:dup) + new_defination end end end