1
0
Fork 0
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:
Ravil Bayramgalin 2021-03-21 22:09:20 +05:00 committed by GitHub
commit bf9cee3b81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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