Remove unused parameter in Fetch/bulk_requeue API

This commit is contained in:
Mike Perham 2022-09-30 08:57:00 -07:00
parent 1db4e1db4c
commit f466a035cf
No known key found for this signature in database
4 changed files with 7 additions and 7 deletions

View File

@ -4,10 +4,10 @@ module Sidekiq
# A Sidekiq::Capsule is the set of resources necessary to
# process one or more queues with a given concurrency.
# One "default" Capsule is started but the user may declare additional
# Capsules in the initializer.
# Capsules in their initializer.
#
# To process a "single" queue with one thread so jobs are processed
# serially, you can do this:
# This capsule will pull jobs from the "single" queue and process
# the jobs with one thread, meaning the jobs will be processed serially.
#
# Sidekiq.configure_server do |config|
# config.capsule("single-threaded") do |cap|
@ -38,7 +38,7 @@ module Sidekiq
end
def stop
fetcher&.bulk_requeue([], nil)
fetcher&.bulk_requeue([])
end
def queues=(val)

View File

@ -50,7 +50,7 @@ module Sidekiq # :nodoc:
UnitOfWork.new(queue, job, config) if queue
end
def bulk_requeue(inprogress, _)
def bulk_requeue(inprogress)
return if inprogress.empty?
logger.debug { "Re-queueing terminated jobs" }

View File

@ -104,7 +104,7 @@ module Sidekiq
# contract says that jobs are run AT LEAST once. Process termination
# is delayed until we're certain the jobs are back in Redis because
# it is worse to lose a job than to run it twice.
capsule.fetcher.bulk_requeue(jobs, nil)
capsule.fetcher.bulk_requeue(jobs)
end
cleanup.each do |processor|

View File

@ -53,7 +53,7 @@ describe Sidekiq::BasicFetch do
assert_equal 0, q1.size
assert_equal 0, q2.size
fetch.bulk_requeue(works, nil)
fetch.bulk_requeue(works)
assert_equal 2, q1.size
assert_equal 1, q2.size
end