Method: ActiveWorker::Expandable.included

Defined in:
lib/active_worker/expandable.rb

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/active_worker/expandable.rb', line 4

def self.included(base)
  base.template_field :number_of_threads, type: Integer, default: 1
  base.template_field :number_of_workers, type: Integer, default: 1
  base.belongs_to :thread_root_configuration, :polymorphic => true
  base.has_many :thread_expanded_configurations,
                :as => :thread_root_configuration,
                :class_name => 'ActiveWorker::Configuration',
                :autosave => true
end