lib/rocket_job/plugins/restart.rb in rocketjob-3.0.0.alpha vs lib/rocket_job/plugins/restart.rb in rocketjob-3.0.0.beta

- old
+ new

@@ -25,9 +25,18 @@ after_abort :rocket_job_restart_new_instance after_complete :rocket_job_restart_new_instance after_fail :rocket_job_restart_abort end + module ClassMethods + def field(name, options) + if options.delete(:copy_on_restart) == false + self.rocket_job_restart_excludes += [name.to_sym] unless rocket_job_restart_excludes.include?(name.to_sym) + end + super(name, options) + end + end + private # Run again in the future, even if this run fails with an exception def rocket_job_restart_new_instance return if expired?