Skip to content

Commit

Permalink
Remove timecop_delay from options hash
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikspang committed Oct 28, 2024
1 parent d805a60 commit 9aaf80b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sentry-sidekiq/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,14 @@ def execute_worker(processor, klass, **options)
end

jid = options.delete(:jid) || "123123"
timecop_delay = options.delete(:timecop_delay)

msg = Sidekiq.dump_json(created_at: Time.now.to_f, enqueued_at: Time.now.to_f, jid: jid, class: klass, args: [], **options)
Timecop.freeze(options[:timecop_delay]) if options[:timecop_delay]
Timecop.freeze(timecop_delay) if timecop_delay
work = Sidekiq::BasicFetch::UnitOfWork.new('queue:default', msg)
process_work(processor, work)
ensure
Timecop.return if options[:timecop_delay]
Timecop.return if timecop_delay
end

def process_work(processor, work)
Expand Down

0 comments on commit 9aaf80b

Please sign in to comment.