lib/rocket_job/plugins/processing_window.rb in rocketjob-3.1.0 vs lib/rocket_job/plugins/processing_window.rb in rocketjob-3.2.0

- old
+ new

@@ -19,12 +19,13 @@ # class BusinessHoursJob < RocketJob::Job # include RocketJob::Plugins::ProcessingWindow # # # The start of the processing window # self.processing_schedule = "30 8 * * * America/New_York" + # # # How long the processing window is: - # self..processing_duration = 12.hours + # self.processing_duration = 12.hours # # def perform # # Job will only run between 8:30am and 8:30pm Eastern # end # end @@ -35,11 +36,11 @@ # of the next processing window. module ProcessingWindow extend ActiveSupport::Concern included do - field :processing_schedule, type: String, class_attribute: true - field :processing_duration, type: Integer, class_attribute: true + field :processing_schedule, type: String, class_attribute: true, user_editable: true, copy_on_restart: true + field :processing_duration, type: Integer, class_attribute: true, user_editable: true, copy_on_restart: true before_create :rocket_job_processing_window_set_run_at before_retry :rocket_job_processing_window_set_run_at after_start :rocket_job_processing_window_check