Class: Jfrog::Saas::Log::ProcessConfig
- Inherits:
-
Object
- Object
- Jfrog::Saas::Log::ProcessConfig
- Includes:
- Singleton
- Defined in:
- lib/jfrog/saas/log/confighandler.rb
Instance Attribute Summary collapse
-
#historical_log_days ⇒ Object
Returns the value of attribute historical_log_days.
-
#minutes_between_runs ⇒ Object
Returns the value of attribute minutes_between_runs.
-
#parallel_downloads ⇒ Object
Returns the value of attribute parallel_downloads.
-
#parallel_process ⇒ Object
Returns the value of attribute parallel_process.
-
#write_logs_by_type ⇒ Object
Returns the value of attribute write_logs_by_type.
Class Method Summary collapse
- .historical_log_days ⇒ Object
- .minutes_between_runs ⇒ Object
- .parallel_downloads ⇒ Object
- .parallel_process ⇒ Object
- .write_logs_by_type ⇒ Object
Instance Method Summary collapse
- #configure(config_file) ⇒ Object
-
#initialize ⇒ ProcessConfig
constructor
A new instance of ProcessConfig.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ ProcessConfig
Returns a new instance of ProcessConfig.
194 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 194 def initialize; end |
Instance Attribute Details
#historical_log_days ⇒ Object
Returns the value of attribute historical_log_days.
192 193 194 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 192 def historical_log_days @historical_log_days end |
#minutes_between_runs ⇒ Object
Returns the value of attribute minutes_between_runs.
192 193 194 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 192 def minutes_between_runs @minutes_between_runs end |
#parallel_downloads ⇒ Object
Returns the value of attribute parallel_downloads.
192 193 194 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 192 def parallel_downloads @parallel_downloads end |
#parallel_process ⇒ Object
Returns the value of attribute parallel_process.
192 193 194 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 192 def parallel_process @parallel_process end |
#write_logs_by_type ⇒ Object
Returns the value of attribute write_logs_by_type.
192 193 194 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 192 def write_logs_by_type @write_logs_by_type end |
Class Method Details
.historical_log_days ⇒ Object
180 181 182 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 180 def self.historical_log_days historical_log_days end |
.minutes_between_runs ⇒ Object
188 189 190 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 188 def self.minutes_between_runs minutes_between_runs end |
.parallel_downloads ⇒ Object
176 177 178 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 176 def self.parallel_downloads parallel_downloads end |
.parallel_process ⇒ Object
172 173 174 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 172 def self.parallel_process parallel_process end |
.write_logs_by_type ⇒ Object
184 185 186 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 184 def self.write_logs_by_type write_logs_by_type end |
Instance Method Details
#configure(config_file) ⇒ Object
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 196 def configure(config_file) config = YAML.load_file(config_file) self.parallel_downloads = if config['process']['parallel_process'].to_i.positive? config['process']['parallel_process'].to_i else 1 end self.parallel_downloads = if config['process']['parallel_downloads'].to_i.positive? config['process']['parallel_downloads'].to_i else 1 end self.historical_log_days = if config['process']['historical_log_days'].to_i.positive? config['process']['historical_log_days'].to_i else 1 end self.write_logs_by_type = config['process']['write_logs_by_type'] self.minutes_between_runs = if config['process']['minutes_between_runs'].to_i.positive? config['process']['minutes_between_runs'].to_i else 180 end end |
#to_s ⇒ Object
225 226 227 |
# File 'lib/jfrog/saas/log/confighandler.rb', line 225 def to_s "Object_id :#{object_id}, parallel_downloads: #{parallel_downloads}, historical_log_days: #{historical_log_days}, write_logs_by_type: #{write_logs_by_type}" end |