Class: ScaleWorkers::Configuration
- Inherits:
-
Object
- Object
- ScaleWorkers::Configuration
- Defined in:
- lib/scale_workers/configuration.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#count_procedure ⇒ Object
Returns the value of attribute count_procedure.
-
#decrement_step ⇒ Object
Returns the value of attribute decrement_step.
-
#increment_step ⇒ Object
Returns the value of attribute increment_step.
-
#load_cycles ⇒ Object
Returns the value of attribute load_cycles.
-
#load_sleep_time ⇒ Object
Returns the value of attribute load_sleep_time.
-
#max_cpu_load ⇒ Object
Returns the value of attribute max_cpu_load.
-
#max_failure ⇒ Object
Returns the value of attribute max_failure.
-
#max_memory_load ⇒ Object
Returns the value of attribute max_memory_load.
-
#max_workers ⇒ Object
Returns the value of attribute max_workers.
-
#min_workers ⇒ Object
Returns the value of attribute min_workers.
-
#notification_interval ⇒ Object
Returns the value of attribute notification_interval.
-
#sleep_time ⇒ Object
Returns the value of attribute sleep_time.
-
#start_procedure ⇒ Object
Returns the value of attribute start_procedure.
-
#stop_procedure ⇒ Object
Returns the value of attribute stop_procedure.
-
#worker_executable_path ⇒ Object
Returns the value of attribute worker_executable_path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/scale_workers/configuration.rb', line 11 def initialize self.max_failure = 5 self.max_workers = 5 self.min_workers = 1 self.sleep_time = 5.minutes self.increment_step = 1 self.decrement_step = -2 self.notification_interval = 15 # machine load attrs self.max_memory_load = 70 self.max_cpu_load = 50 self.load_cycles = 5 self.load_sleep_time = 10 self.adapter = 'delayed_job_active_record' self.worker_executable_path = 'script/delayed_job' end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
9 10 11 |
# File 'lib/scale_workers/configuration.rb', line 9 def adapter @adapter end |
#count_procedure ⇒ Object
Returns the value of attribute count_procedure.
7 8 9 |
# File 'lib/scale_workers/configuration.rb', line 7 def count_procedure @count_procedure end |
#decrement_step ⇒ Object
Returns the value of attribute decrement_step.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def decrement_step @decrement_step end |
#increment_step ⇒ Object
Returns the value of attribute increment_step.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def increment_step @increment_step end |
#load_cycles ⇒ Object
Returns the value of attribute load_cycles.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def load_cycles @load_cycles end |
#load_sleep_time ⇒ Object
Returns the value of attribute load_sleep_time.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def load_sleep_time @load_sleep_time end |
#max_cpu_load ⇒ Object
Returns the value of attribute max_cpu_load.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def max_cpu_load @max_cpu_load end |
#max_failure ⇒ Object
Returns the value of attribute max_failure.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def max_failure @max_failure end |
#max_memory_load ⇒ Object
Returns the value of attribute max_memory_load.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def max_memory_load @max_memory_load end |
#max_workers ⇒ Object
Returns the value of attribute max_workers.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def max_workers @max_workers end |
#min_workers ⇒ Object
Returns the value of attribute min_workers.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def min_workers @min_workers end |
#notification_interval ⇒ Object
Returns the value of attribute notification_interval.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def notification_interval @notification_interval end |
#sleep_time ⇒ Object
Returns the value of attribute sleep_time.
4 5 6 |
# File 'lib/scale_workers/configuration.rb', line 4 def sleep_time @sleep_time end |
#start_procedure ⇒ Object
Returns the value of attribute start_procedure.
7 8 9 |
# File 'lib/scale_workers/configuration.rb', line 7 def start_procedure @start_procedure end |
#stop_procedure ⇒ Object
Returns the value of attribute stop_procedure.
7 8 9 |
# File 'lib/scale_workers/configuration.rb', line 7 def stop_procedure @stop_procedure end |
#worker_executable_path ⇒ Object
Returns the value of attribute worker_executable_path.
9 10 11 |
# File 'lib/scale_workers/configuration.rb', line 9 def worker_executable_path @worker_executable_path end |