Class: Bluepan::LoadSidekiqCronSchedule

Inherits:
Object
  • Object
show all
Defined in:
app/services/bluepan/load_sidekiq_cron_schedule.rb

Class Method Summary collapse

Class Method Details

.callObject



4
5
6
7
8
9
10
# File 'app/services/bluepan/load_sidekiq_cron_schedule.rb', line 4

def self.call
  schedule_file = Bluepan::Engine.root.join("config", "sidekiq_cron.yml")

  return nil if !File.exists?(schedule_file) || !Sidekiq.server?

  Sidekiq::Cron::Job.load_from_hash(YAML.load_file(schedule_file))
end