Skip to content

Commit

Permalink
Merge pull request #155 from uichi/sidekiq-v7-fix-queues-value
Browse files Browse the repository at this point in the history
fix queues value
  • Loading branch information
deanpcmad authored Jan 22, 2023
2 parents 9ba331a + b222c01 commit e640c8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/sidekiq/limit_fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def 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(config).bulk_requeue(*args)
Sidekiq::BasicFetch.new(post_7? ? Sidekiq.default_configuration.default_capsule : config).bulk_requeue(*args)
end
end

Expand Down
10 changes: 8 additions & 2 deletions lib/sidekiq/limit_fetch/queues.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ module Queues
def start(capsule_or_options)
config = Sidekiq::LimitFetch.post_7? ? capsule_or_options.config : capsule_or_options

@queues = config[:queues]
@startup_queues = config[:queues].dup
@queues = config[:queues].map do |queue|
if queue.is_a? Array
queue.first
else
queue
end
end.uniq
@startup_queues = @queues.dup

if config[:dynamic].is_a? Hash
@dynamic = true
Expand Down

0 comments on commit e640c8b

Please sign in to comment.