mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FEATURE: admin dashboard check when email polling errored in the past 24 hours
This commit is contained in:
@ -63,7 +63,7 @@ class AdminDashboardData
|
||||
:send_consumer_email_check, :title_check,
|
||||
:site_description_check, :site_contact_username_check,
|
||||
:notification_email_check, :subfolder_ends_in_slash_check,
|
||||
:pop3_polling_configuration
|
||||
:pop3_polling_configuration, :email_polling_errored_recently
|
||||
|
||||
add_problem_check do
|
||||
sidekiq_check || queue_size_check
|
||||
@ -210,4 +210,9 @@ class AdminDashboardData
|
||||
POP3PollingEnabledSettingValidator.new.error_message if SiteSetting.pop3_polling_enabled
|
||||
end
|
||||
|
||||
def email_polling_errored_recently
|
||||
errors = Jobs::PollMailbox.errors_in_past_24_hours
|
||||
I18n.t('dashboard.email_polling_errored_recently', count: errors) if errors > 0
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user