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.
-
#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.
-
#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.
38 39 40 41 42 43 |
# File 'lib/rrrspec/server/configuration.rb', line 38 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.
36 37 38 |
# File 'lib/rrrspec/server/configuration.rb', line 36 def daemonize @daemonize end |
#pidfile ⇒ Object
Returns the value of attribute pidfile.
36 37 38 |
# File 'lib/rrrspec/server/configuration.rb', line 36 def pidfile @pidfile end |
#rsync_options ⇒ Object
Returns the value of attribute rsync_options.
34 35 36 |
# File 'lib/rrrspec/server/configuration.rb', line 34 def @rsync_options end |
#rsync_remote_path ⇒ Object
Returns the value of attribute rsync_remote_path.
34 35 36 |
# File 'lib/rrrspec/server/configuration.rb', line 34 def rsync_remote_path @rsync_remote_path end |
#slave_processes ⇒ Object
Returns the value of attribute slave_processes.
35 36 37 |
# File 'lib/rrrspec/server/configuration.rb', line 35 def slave_processes @slave_processes end |
#user ⇒ Object
Returns the value of attribute user.
36 37 38 |
# File 'lib/rrrspec/server/configuration.rb', line 36 def user @user end |
#worker_type ⇒ Object
Returns the value of attribute worker_type.
35 36 37 |
# File 'lib/rrrspec/server/configuration.rb', line 35 def worker_type @worker_type end |
#working_dir ⇒ Object
Returns the value of attribute working_dir.
35 36 37 |
# File 'lib/rrrspec/server/configuration.rb', line 35 def working_dir @working_dir end |
Instance Method Details
#check_validity ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/rrrspec/server/configuration.rb', line 45 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 |