lib/sidekiq/throttled/fetch/unit_of_work.rb in sidekiq-throttled-0.6.3 vs lib/sidekiq/throttled/fetch/unit_of_work.rb in sidekiq-throttled-0.6.4

- old
+ new

@@ -52,26 +52,26 @@ # @return [void] def requeue Sidekiq.redis { |conn| conn.rpush(QueueName.expand(queue_name), job) } end - # Tells whenever job should be pushed back to queue (throttled) or not. - # - # @see Sidekiq::Throttled.throttled? - # @return [Boolean] - def throttled? - Throttled.throttled? job - end - # Pushes job back to the head of the queue, so that job won't be tried # immediately after it was requeued (in most cases). # # @note This is triggered when job is throttled. So it is same operation # Sidekiq performs upon `Sidekiq::Worker.perform_async` call. # # @return [void] - def throttled_requeue + def requeue_throttled Sidekiq.redis { |conn| conn.lpush(QueueName.expand(queue_name), job) } + end + + # Tells whenever job should be pushed back to queue (throttled) or not. + # + # @see Sidekiq::Throttled.throttled? + # @return [Boolean] + def throttled? + Throttled.throttled? job end end end end end