Skip to content

Commit

Permalink
Don't pass options arg to Sidekiq::Cron::Job.load_from_hash!
Browse files Browse the repository at this point in the history
  • Loading branch information
natikgadzhi committed Nov 22, 2023
1 parent ebc3fc5 commit 4bd493a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sentry-sidekiq/spec/sentry/sidekiq/cron/job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
before do
schedule_file = 'spec/fixtures/schedule.yml'
schedule = Sidekiq::Cron::Support.load_yaml(ERB.new(IO.read(schedule_file)).result)
Sidekiq::Cron::Job.load_from_hash!(schedule, source: 'schedule')
# sidekiq-cron 2.0+ accepts second argument to `load_from_hash!` with options,
# such as {source: 'schedule'}, but sidekiq-cron 1.9.1 (last version to support Ruby 2.6) does not.
# Since we're not using the source option in our code anyway, it's safe to not pass the 2nd arg.
Sidekiq::Cron::Job.load_from_hash!(schedule)
end

it 'patches class' do
Expand Down

0 comments on commit 4bd493a

Please sign in to comment.