mirror of
https://github.com/deanpcmad/sidekiq-limit_fetch.git
synced 2022-11-09 13:54:36 -05:00
Merge pull request #115 from nepalez/master
Fix compatibility issue for sidekiq v6.1.0+
This commit is contained in:
commit
bf9cee3b81
1 changed files with 7 additions and 1 deletions
|
@ -26,8 +26,14 @@ module Sidekiq::LimitFetch
|
|||
UnitOfWork.new(queue, job) if job
|
||||
end
|
||||
|
||||
# Backwards compatibility for sidekiq v6.1.0
|
||||
# @see https://github.com/mperham/sidekiq/pull/4602
|
||||
def bulk_requeue(*args)
|
||||
Sidekiq::BasicFetch.bulk_requeue(*args)
|
||||
if Sidekiq::BasicFetch.respond_to?(:bulk_requeue) # < 6.1.0
|
||||
Sidekiq::BasicFetch.bulk_requeue(*args)
|
||||
else # 6.1.0+
|
||||
Sidekiq::BasicFetch.new(Sidekiq.options).bulk_requeue(*args)
|
||||
end
|
||||
end
|
||||
|
||||
def redis_retryable
|
||||
|
|
Loading…
Add table
Reference in a new issue