Class: Qwirk::Adapter::Inline::WorkerConfig

Inherits:
Base::WorkerConfig show all
Defined in:
lib/qwirk/adapter/inline/worker_config.rb

Instance Attribute Summary

Attributes inherited from Base::WorkerConfig

#adapter_factory, #default_options, #manager, #marshal_sym, #marshaler, #name, #options, #queue_name, #queue_options, #response_options, #topic_name, #worker_class

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base::WorkerConfig

#bean_attributes_changed, #init, #initialize, #join, #marshal_response, #periodic_call, #stop, #stopped?, #to_s, #unmarshal_response, #worker_stopped

Constructor Details

This class inherits a constructor from Qwirk::Adapter::Base::WorkerConfig

Class Method Details

.default_marshal_symObject



10
11
12
# File 'lib/qwirk/adapter/inline/worker_config.rb', line 10

def self.default_marshal_sym
  :none
end

.in_process?(config) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/qwirk/adapter/inline/worker_config.rb', line 19

def self.in_process?(config)
  true
end

.initial_default_configObject

Define the default config values for the attributes all workers will share. These will be sent as options to the constructor



15
16
17
# File 'lib/qwirk/adapter/inline/worker_config.rb', line 15

def self.initial_default_config
  super.merge(:active => false)
end

Instance Method Details

#create_workerObject



28
29
30
# File 'lib/qwirk/adapter/inline/worker_config.rb', line 28

def create_worker
  Worker.new(self.name, self.marshaler)
end

#min_count=(min_count) ⇒ Object

Hack - Steal attribute from expanding_worker_config so test config can share development config



24
25
26
# File 'lib/qwirk/adapter/inline/worker_config.rb', line 24

def min_count=(min_count)
  @active = (min_count > 0)
end