Skip to content

Commit e640c8b

Browse files
authored
Merge pull request #155 from uichi/sidekiq-v7-fix-queues-value
fix queues value
2 parents 9ba331a + b222c01 commit e640c8b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/sidekiq/limit_fetch.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def bulk_requeue(*args)
5353
if Sidekiq::BasicFetch.respond_to?(:bulk_requeue) # < 6.1.0
5454
Sidekiq::BasicFetch.bulk_requeue(*args)
5555
else # 6.1.0+
56-
Sidekiq::BasicFetch.new(config).bulk_requeue(*args)
56+
Sidekiq::BasicFetch.new(post_7? ? Sidekiq.default_configuration.default_capsule : config).bulk_requeue(*args)
5757
end
5858
end
5959

lib/sidekiq/limit_fetch/queues.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ module Queues
1414
def start(capsule_or_options)
1515
config = Sidekiq::LimitFetch.post_7? ? capsule_or_options.config : capsule_or_options
1616

17-
@queues = config[:queues]
18-
@startup_queues = config[:queues].dup
17+
@queues = config[:queues].map do |queue|
18+
if queue.is_a? Array
19+
queue.first
20+
else
21+
queue
22+
end
23+
end.uniq
24+
@startup_queues = @queues.dup
1925

2026
if config[:dynamic].is_a? Hash
2127
@dynamic = true

0 commit comments

Comments
 (0)