Class: Jobs::ProblemChecks

Inherits:
Scheduled show all
Defined in:
app/jobs/scheduled/problem_checks.rb

Overview

This job runs all of the scheduled problem checks for the admin dashboard on a regular basis. To add a problem check for this scheduled job run call AdminDashboardData.add_scheduled_problem_check

Instance Method Summary collapse

Methods inherited from Scheduled

#perform

Methods inherited from Base

acquire_cluster_concurrency_lock!, clear_cluster_concurrency_lock!, cluster_concurrency, cluster_concurrency_redis_key, delayed_perform, #error_context, get_cluster_concurrency, #last_db_duration, #log, #perform, #perform_immediately

Instance Method Details

#execute(_args) ⇒ Object



10
11
12
13
14
15
# File 'app/jobs/scheduled/problem_checks.rb', line 10

def execute(_args)
  # This way if the problems have been solved in the meantime, then they will
  # not be re-added by the relevant checker, and will be cleared.
  AdminDashboardData.clear_found_scheduled_check_problems
  AdminDashboardData.execute_scheduled_checks
end