Class: RRRSpec::Server::WorkerConfiguration
- Inherits:
-
Configuration
- Object
- Configuration
- RRRSpec::Server::WorkerConfiguration
- Defined in:
- lib/rrrspec/server/configuration.rb
Instance Attribute Summary collapse
-
#daemonize ⇒ Object
Returns the value of attribute daemonize.
-
#monitor ⇒ Object
Returns the value of attribute monitor.
-
#pidfile ⇒ Object
Returns the value of attribute pidfile.
-
#rsync_options ⇒ Object
Returns the value of attribute rsync_options.
-
#rsync_remote_path ⇒ Object
Returns the value of attribute rsync_remote_path.
-
#slave_processes ⇒ Object
Returns the value of attribute slave_processes.
-
#stderr_path ⇒ Object
Returns the value of attribute stderr_path.
-
#stdout_path ⇒ Object
Returns the value of attribute stdout_path.
-
#user ⇒ Object
Returns the value of attribute user.
-
#worker_type ⇒ Object
Returns the value of attribute worker_type.
-
#working_dir ⇒ Object
Returns the value of attribute working_dir.
Instance Method Summary collapse
- #check_validity ⇒ Object
-
#initialize ⇒ WorkerConfiguration
constructor
A new instance of WorkerConfiguration.
Constructor Details
#initialize ⇒ WorkerConfiguration
Returns a new instance of WorkerConfiguration.
41 42 43 44 45 46 |
# File 'lib/rrrspec/server/configuration.rb', line 41 def initialize super() @slave_processes = Facter.value(:processorcount).to_i @worker_type = 'default' @type = :worker end |
Instance Attribute Details
#daemonize ⇒ Object
Returns the value of attribute daemonize.
37 38 39 |
# File 'lib/rrrspec/server/configuration.rb', line 37 def daemonize @daemonize end |
#monitor ⇒ Object
Returns the value of attribute monitor.
39 40 41 |
# File 'lib/rrrspec/server/configuration.rb', line 39 def monitor @monitor end |
#pidfile ⇒ Object
Returns the value of attribute pidfile.
37 38 39 |
# File 'lib/rrrspec/server/configuration.rb', line 37 def pidfile @pidfile end |
#rsync_options ⇒ Object
Returns the value of attribute rsync_options.
35 36 37 |
# File 'lib/rrrspec/server/configuration.rb', line 35 def @rsync_options end |
#rsync_remote_path ⇒ Object
Returns the value of attribute rsync_remote_path.
35 36 37 |
# File 'lib/rrrspec/server/configuration.rb', line 35 def rsync_remote_path @rsync_remote_path end |
#slave_processes ⇒ Object
Returns the value of attribute slave_processes.
36 37 38 |
# File 'lib/rrrspec/server/configuration.rb', line 36 def slave_processes @slave_processes end |
#stderr_path ⇒ Object
Returns the value of attribute stderr_path.
38 39 40 |
# File 'lib/rrrspec/server/configuration.rb', line 38 def stderr_path @stderr_path end |
#stdout_path ⇒ Object
Returns the value of attribute stdout_path.
38 39 40 |
# File 'lib/rrrspec/server/configuration.rb', line 38 def stdout_path @stdout_path end |
#user ⇒ Object
Returns the value of attribute user.
37 38 39 |
# File 'lib/rrrspec/server/configuration.rb', line 37 def user @user end |
#worker_type ⇒ Object
Returns the value of attribute worker_type.
36 37 38 |
# File 'lib/rrrspec/server/configuration.rb', line 36 def worker_type @worker_type end |
#working_dir ⇒ Object
Returns the value of attribute working_dir.
36 37 38 |
# File 'lib/rrrspec/server/configuration.rb', line 36 def working_dir @working_dir end |
Instance Method Details
#check_validity ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/rrrspec/server/configuration.rb', line 48 def check_validity validity = super unless rsync_remote_path and $stderr.puts('The rsync options are not set') validity = false end unless working_dir and worker_type $stderr.puts('The worker options are not set') validity = false end validity end |