module Sidekiq::Throttled::Worker
Adds helpers to your worker classes
@example Usage
class MyJob include Sidekiq::Job include Sidekiq::Throttled::Job sidkiq_options :queue => :my_queue sidekiq_throttle :threshold => { :limit => 123, :period => 1.hour }, :requeue => { :to => :other_queue, :with => :schedule } def perform # ... end end
@see ClassMethods
Public Class Methods
Source
# File lib/sidekiq/throttled/job.rb, line 33 def self.included(base) base.sidekiq_class_attribute :sidekiq_throttled_requeue_options base.extend(ClassMethods) end
Extends worker class with {ClassMethods}.
@note Using ‘included` hook with extending worker with {ClassMethods}
in order to make API inline with `include Sidekiq::Job`.
@private