Class: Qwirk::Adapter::Inline::WorkerConfig
- Inherits:
-
Base::WorkerConfig
- Object
- Base::WorkerConfig
- Qwirk::Adapter::Inline::WorkerConfig
- 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
- .default_marshal_sym ⇒ Object
- .in_process?(config) ⇒ Boolean
-
.initial_default_config ⇒ Object
Define the default config values for the attributes all workers will share.
Instance Method Summary collapse
- #create_worker ⇒ Object
-
#min_count=(min_count) ⇒ Object
Hack - Steal attribute from expanding_worker_config so test config can share development config.
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_sym ⇒ Object
10 11 12 |
# File 'lib/qwirk/adapter/inline/worker_config.rb', line 10 def self.default_marshal_sym :none end |
.in_process?(config) ⇒ Boolean
19 20 21 |
# File 'lib/qwirk/adapter/inline/worker_config.rb', line 19 def self.in_process?(config) true end |
.initial_default_config ⇒ Object
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_worker ⇒ Object
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 |