Class: QaServer::PerformanceMonthGraphCache

Inherits:
Object
  • Object
show all
Defined in:
app/cache_processors/qa_server/performance_month_graph_cache.rb

Class Method Summary collapse

Class Method Details

.generate_graphs(force: false) ⇒ Object

Generates graphs for the past 30 days for :search, :fetch, and :all actions for each authority.

Parameters:

  • force (Boolean) (defaults to: false)

    if true, run the tests even if the cache hasn’t expired; otherwise, use cache if not expired



8
9
10
11
12
13
14
# File 'app/cache_processors/qa_server/performance_month_graph_cache.rb', line 8

def generate_graphs(force: false)
  Rails.cache.fetch(cache_key, expires_in: next_expiry, race_condition_ttl: 30.seconds, force: force) do
    QaServer.config.monitor_logger.debug("(QaServer::PerformanceMonthGraphCache) - KICKING OFF PERFORMANCE MONTH GRAPH GENERATION (force: #{force})")
    QaServer::PerformanceMonthGraphJob.perform_later
    "Graphs generation initiated at #{QaServer::TimeService.current_time}"
  end
end