mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Appropriately handle uninstalled problem checks (#28771)
When running checks, we look to the existing problem check trackers and try to grab their ProblemCheck classes. In some cases this is no longer in the problem check repository, e.g. when the check was part of a plugin that has been uninstalled. In the case where the check was scheduled, this would lead to an error in one of the jobs
This commit is contained in:
@@ -43,7 +43,14 @@ class ProblemCheckTracker < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def check
|
||||
ProblemCheck[identifier]
|
||||
check = ProblemCheck[identifier]
|
||||
|
||||
return check if check.present?
|
||||
|
||||
silence_the_alarm
|
||||
destroy
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user