Class: SourceMonitor::Configuration::ScrapingSettings
- Inherits:
-
Object
- Object
- SourceMonitor::Configuration::ScrapingSettings
- Defined in:
- lib/source_monitor/configuration/scraping_settings.rb
Constant Summary collapse
- DEFAULT_MAX_IN_FLIGHT =
nil- DEFAULT_MAX_BULK_BATCH_SIZE =
100- DEFAULT_MIN_SCRAPE_INTERVAL =
1.0- DEFAULT_SCRAPE_RECOMMENDATION_THRESHOLD =
200
Instance Attribute Summary collapse
-
#max_bulk_batch_size ⇒ Object
Returns the value of attribute max_bulk_batch_size.
-
#max_in_flight_per_source ⇒ Object
Returns the value of attribute max_in_flight_per_source.
-
#min_scrape_interval ⇒ Object
Returns the value of attribute min_scrape_interval.
-
#scrape_recommendation_threshold ⇒ Object
Returns the value of attribute scrape_recommendation_threshold.
Instance Method Summary collapse
-
#initialize ⇒ ScrapingSettings
constructor
A new instance of ScrapingSettings.
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ ScrapingSettings
Returns a new instance of ScrapingSettings.
14 15 16 |
# File 'lib/source_monitor/configuration/scraping_settings.rb', line 14 def initialize reset! end |
Instance Attribute Details
#max_bulk_batch_size ⇒ Object
Returns the value of attribute max_bulk_batch_size.
6 7 8 |
# File 'lib/source_monitor/configuration/scraping_settings.rb', line 6 def max_bulk_batch_size @max_bulk_batch_size end |
#max_in_flight_per_source ⇒ Object
Returns the value of attribute max_in_flight_per_source.
6 7 8 |
# File 'lib/source_monitor/configuration/scraping_settings.rb', line 6 def max_in_flight_per_source @max_in_flight_per_source end |
#min_scrape_interval ⇒ Object
Returns the value of attribute min_scrape_interval.
6 7 8 |
# File 'lib/source_monitor/configuration/scraping_settings.rb', line 6 def min_scrape_interval @min_scrape_interval end |
#scrape_recommendation_threshold ⇒ Object
Returns the value of attribute scrape_recommendation_threshold.
6 7 8 |
# File 'lib/source_monitor/configuration/scraping_settings.rb', line 6 def scrape_recommendation_threshold @scrape_recommendation_threshold end |
Instance Method Details
#reset! ⇒ Object
18 19 20 21 22 23 |
# File 'lib/source_monitor/configuration/scraping_settings.rb', line 18 def reset! @max_in_flight_per_source = DEFAULT_MAX_IN_FLIGHT @max_bulk_batch_size = DEFAULT_MAX_BULK_BATCH_SIZE @min_scrape_interval = DEFAULT_MIN_SCRAPE_INTERVAL @scrape_recommendation_threshold = DEFAULT_SCRAPE_RECOMMENDATION_THRESHOLD end |