Class: QaServer::ScenarioHistoryCache
- Inherits:
-
Object
- Object
- QaServer::ScenarioHistoryCache
- Extended by:
- CacheKeys
- Defined in:
- app/cache_processors/qa_server/scenario_history_cache.rb
Constant Summary
Constants included from CacheKeys
CacheKeys::PERFORMANCE_DATATABLE_DATA_CACHE_KEY, CacheKeys::SCENARIO_RUN_FAILURE_DATA_CACHE_KEY, CacheKeys::SCENARIO_RUN_HISTORY_DATA_CACHE_KEY, CacheKeys::SCENARIO_RUN_HISTORY_UP_DOWN_DATA_CACHE_KEY, CacheKeys::SCENARIO_RUN_SUMMARY_DATA_CACHE_KEY
Class Method Summary collapse
-
.historical_summary(force: false) ⇒ Object
Get a summary of the number of days passing/failing for scenario runs during configured time period.
-
.historical_up_down_data(force: false) ⇒ Object
Get a status for each of the last 30 days for queries that succeeded or failed.
Class Method Details
.historical_summary(force: false) ⇒ Object
Get a summary of the number of days passing/failing for scenario runs during configured time period
18 19 20 21 22 23 |
# File 'app/cache_processors/qa_server/scenario_history_cache.rb', line 18 def historical_summary(force: false) Rails.cache.fetch(cache_key_for_historical_data, expires_in: next_expiry, race_condition_ttl: 30.seconds, force: force) do QaServer.config.monitor_logger.debug("(QaServer::ScenarioHistoryCache) - CALCULATING HISTORY of scenario runs (force: #{force})") scenario_history_class.historical_summary end end |
.historical_up_down_data(force: false) ⇒ Object
Get a status for each of the last 30 days for queries that succeeded or failed.
31 32 33 34 35 36 |
# File 'app/cache_processors/qa_server/scenario_history_cache.rb', line 31 def historical_up_down_data(force: false) Rails.cache.fetch(cache_key_for_historical_up_down_data, expires_in: next_expiry, race_condition_ttl: 30.seconds, force: force) do QaServer.config.monitor_logger.debug("(QaServer::ScenarioHistoryCache) - CALCULATING UP-DOWN STATUS HISTORY of scenario runs (force: #{force})") scenario_up_down_class.new.last_30_days end end |