sidekiq-throttled icon indicating copy to clipboard operation
sidekiq-throttled copied to clipboard

Passing the timeout as a positional argument is deprecated

Open Alexander-Andrade opened this issue 1 year ago • 2 comments

versions sidekiq (6.5.5) sidekiq-throttled (0.16.2) redis (4.8.0)

Passing the timeout as a positional argument is deprecated, it should be passed as a keyword argument:
  redis.brpop("queue:mailers", "queue:api_call", "queue:scheduled", "queue:searchkick", "queue:active_storage_analysis", "queue:active_storage_purge", "queue:default", timeout: 2)(called from: /home/xxx/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/sidekiq-throttled-0.16.2/lib/sidekiq/throttled/fetch.rb:94:in `block in brpop')

sidekiq/throttled/fetch.rb:86

      def brpop
        queues = filter_queues(@strict ? @queues : @queues.shuffle.uniq)

        if queues.empty?
          sleep TIMEOUT
          return
        end

        Sidekiq.redis { |conn| conn.brpop(*queues, TIMEOUT) }
      end

Sidekiq.redis { |conn| conn.brpop(*queues, TIMEOUT) } timeout provided as a positional argument, not as a keyword one

Alexander-Andrade avatar Aug 26 '22 09:08 Alexander-Andrade

this can be closed in favour of https://github.com/ixti/sidekiq-throttled/pull/13

the development now seems to happen on this other ixti repo

adipasquale avatar Aug 30 '22 07:08 adipasquale

thank you!

Alexander-Andrade avatar Aug 30 '22 10:08 Alexander-Andrade