Class: Que::Scheduler::SchedulerJobArgs
- Inherits:
-
Hashie::Dash
- Object
- Hashie::Dash
- Que::Scheduler::SchedulerJobArgs
- Defined in:
- lib/que/scheduler/scheduler_job_args.rb
Class Method Summary collapse
Class Method Details
.build(options) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/que/scheduler/scheduler_job_args.rb', line 13 def self.build() now = Que::Scheduler::Db.now parsed = if .nil? # First ever run, there is nothing to do but reschedule self to run on the next minute. { last_run_time: now, job_dictionary: [], } else = .symbolize_keys { last_run_time: Que::Scheduler::TimeZone.time_zone.parse(.fetch(:last_run_time)), job_dictionary: .fetch(:job_dictionary), } end SchedulerJobArgs.new(parsed.merge(as_time: now)) end |