Module: Sidetiq::Schedulable

Extended by:
SubclassTracking
Defined in:
lib/sidetiq/schedulable.rb

Overview

Public: Mixin for Sidekiq::Worker classes.

Examples

class MyWorker
  include Sidekiq::Worker
  include Sidetiq::Schedulable

  # Daily at midnight
  recurrence { daily }
end

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Methods included from SubclassTracking

inherited, subclasses

Class Method Details

.included(klass) ⇒ Object

:nodoc:


75
76
77
78
79
80
81
# File 'lib/sidetiq/schedulable.rb', line 75

def self.included(klass) # :nodoc:
  super

  klass.extend(Sidetiq::Schedulable::ClassMethods)
  klass.extend(Sidetiq::SubclassTracking)
  subclasses << klass
end