Class: SimpleScheduler::SchedulerJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/simple_scheduler/scheduler_job.rb

Overview

Active Job class that queues jobs defined in the config file.

Instance Method Summary collapse

Instance Method Details

#perform(config_path = nil) ⇒ Object

Accepts a file path to read the scheduler configuration.

Parameters:

  • config_path (String) (defaults to: nil)


6
7
8
9
10
# File 'lib/simple_scheduler/scheduler_job.rb', line 6

def perform(config_path = nil)
  config_path ||= "config/simple_scheduler.yml"
  load_config(config_path)
  queue_future_jobs
end