Skip to content

Commit

Permalink
Merge 7ef6c00 into 25d7bc7
Browse files Browse the repository at this point in the history
  • Loading branch information
spk committed Apr 11, 2019
2 parents 25d7bc7 + 7ef6c00 commit 9d1d198
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ second_job:
schedule_file = "config/schedule.yml"

if File.exist?(schedule_file) && Sidekiq.server?
Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file)
hash = YAML.load_file(schedule_file)
Sidekiq::Cron::Job.load_from_hash(hash) if hash
end
```

Expand Down Expand Up @@ -281,7 +282,8 @@ Sidekiq.configure_server do |config|
schedule_file = "config/schedule.yml"

if File.exist?(schedule_file)
Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file)
hash = YAML.load_file(schedule_file)
Sidekiq::Cron::Job.load_from_hash(hash) if hash
end
end
```
Expand Down

0 comments on commit 9d1d198

Please sign in to comment.