discourse/app/models
Ted Johansson a72dc2f420
DEV: Introduce a problem checks API (#25783)
Previously, problem checks were all added as either class methods or blocks in AdminDashboardData. Another set of class methods were used to add and run problem checks.

As of this PR, problem checks are promoted to first-class citizens. Each problem check receives their own class. This class of course contains the implementation for running the check, but also configuration items like retry strategies (for scheduled checks.)

In addition, the parent class ProblemCheck also serves as a registry for checks. For example we can get a list of all existing check classes through ProblemCheck.checks, or just the ones running on a schedule through ProblemCheck.scheduled.

After this refactor, the task of adding a new check is significantly simplified. You add a class that inherits ProblemCheck, you implement it, add a test, and you're good to go.
2024-02-23 11:20:32 +08:00
..
concerns FIX: Always trust admin and moderators with post edits (#25602) 2024-02-08 13:10:26 +10:00
about.rb DEV: Fix Lint/DuplicateMethods (#24746) 2023-12-06 13:18:34 +01:00
admin_dashboard_data.rb DEV: Introduce a problem checks API (#25783) 2024-02-23 11:20:32 +08:00
admin_dashboard_general_data.rb
admin_dashboard_index_data.rb
allowed_pm_user.rb
anonymous_user.rb
api_key_scope.rb FEATURE: Add API scope for /logs route (#24956) 2023-12-18 19:45:04 -07:00
api_key.rb DEV: update syntax tree to latest (#24623) 2023-11-29 16:38:07 +11:00
application_request.rb
associated_group.rb
auto_track_duration_site_setting.rb
backup_draft_post.rb
backup_draft_topic.rb
backup_file.rb
backup_location_site_setting.rb
backup_metadata.rb
badge_grouping.rb
badge_type.rb
badge.rb DEV: Drop deprecated Badge#image column (#25536) 2024-02-02 14:09:55 +08:00
base_font_setting.rb
bookmark.rb DEV: update syntax tree to latest (#24623) 2023-11-29 16:38:07 +11:00
category_and_topic_lists.rb
category_custom_field.rb DEV: Add true_fields method for CustomFields (#24876) 2023-12-14 11:06:21 -06:00
category_featured_topic.rb
category_form_template.rb
category_group.rb
category_list.rb FIX: Preload associations on subcategories when lazy loading categories (#25630) 2024-02-09 11:48:26 -06:00
category_page_style.rb
category_required_tag_group.rb
category_search_data.rb
category_setting.rb
category_tag_group.rb
category_tag_stat.rb
category_tag.rb
category_user.rb
category.rb FIX: Cache keys should be strings (#25791) 2024-02-21 10:55:48 -06:00
child_theme.rb
color_scheme_color.rb
color_scheme_setting.rb
color_scheme.rb UX: Update selected colour var (#25500) 2024-01-31 09:32:38 +01:00
custom_emoji.rb
developer.rb
digest_email_site_setting.rb
directory_column.rb
directory_item.rb
discourse_connect.rb DEV: lint against Layout/EmptyLineBetweenDefs (#24914) 2023-12-15 23:46:04 +08:00
discourse_version_check.rb
dismissed_topic_user.rb
do_not_disturb_timing.rb
draft_sequence.rb
draft.rb
email_change_request.rb
email_level_site_setting.rb
email_log.rb
email_style.rb DEV: Fix Lint/DuplicateMethods (#24746) 2023-12-06 13:18:34 +01:00
email_token.rb DEV: update syntax tree to latest (#24623) 2023-11-29 16:38:07 +11:00
embeddable_host.rb
embedding.rb
emoji_set_site_setting.rb
emoji.rb
external_upload_stub.rb DEV: update syntax tree to latest (#24623) 2023-11-29 16:38:07 +11:00
form_template.rb
given_daily_like.rb
global_setting.rb DEV: Fix Lint/BooleanSymbol (#24747) 2023-12-06 13:19:09 +01:00
group_archived_message.rb
group_associated_group.rb
group_category_notification_default.rb
group_custom_field.rb DEV: Add true_fields method for CustomFields (#24876) 2023-12-14 11:06:21 -06:00
group_history.rb
group_mention.rb
group_request.rb
group_tag_notification_default.rb
group_user.rb DEV: Make more group-based settings client: false (#25585) 2024-02-08 09:43:34 +10:00
group.rb DEV: Change Group.trusted_group_ids to use const (#25639) 2024-02-12 12:36:00 +10:00
ignored_user.rb
imap_sync_log.rb
incoming_domain.rb
incoming_email.rb DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
incoming_link.rb
incoming_links_report.rb FIX: Respect date range in top traffic sources report (#25599) 2024-02-08 11:17:59 -05:00
incoming_referer.rb
invite_redeemer.rb
invite.rb DEV: lint against Layout/EmptyLineBetweenDefs (#24914) 2023-12-15 23:46:04 +08:00
invited_group.rb
invited_user.rb
javascript_cache.rb DEV: Introduce DISCOURSE_ASSET_URL_SALT (#24596) 2023-11-28 11:28:40 +00:00
like_notification_frequency_site_setting.rb
linked_topic.rb
locale_site_setting.rb
mailing_list_mode_site_setting.rb
muted_user.rb
navigation_menu_site_setting.rb FEATURE: Remove support for legacy navigation menu (#23752) 2023-10-09 07:24:10 +08:00
new_topic_duration_site_setting.rb
notification_level_when_replying_site_setting.rb
notification.rb FEATURE: Site setting to display user avatars in user menu (#24514) 2023-12-07 11:30:44 -06:00
oauth2_user_info.rb
onceoff_log.rb
optimized_image.rb DEV: Allow rebakes to generate optimized images at the same time 2024-01-16 14:33:16 +01:00
permalink.rb FEATURE: Permalinks for users (#25552) 2024-02-05 17:31:31 +01:00
plugin_store_row.rb
plugin_store.rb
post_action_type.rb FEATURE: Add new 'illegal' flag reason (#25498) 2024-02-07 10:12:22 +08:00
post_action.rb DEV: Remove deprecated PostAction.remove_act method (#24126) 2023-10-27 10:02:14 +08:00
post_analyzer.rb FIX: user got notified about a mention inside a chat message quote (#24229) 2023-11-08 23:13:25 +04:00
post_custom_field.rb DEV: Add true_fields method for CustomFields (#24876) 2023-12-14 11:06:21 -06:00
post_detail.rb
post_hotlinked_media.rb
post_mover.rb FIX: Post moved small action links should respect subfolder installs (#24336) 2023-11-13 11:06:25 +08:00
post_reply_key.rb
post_reply.rb
post_revision.rb
post_search_data.rb
post_stat.rb
post_stripper.rb FIX: user got notified about a mention inside a chat message quote (#24229) 2023-11-08 23:13:25 +04:00
post_timing.rb
post.rb FEATURE: Auto generate and display video preview image (#25633) 2024-02-14 13:43:53 -07:00
previous_replies_site_setting.rb
private_message_topic_tracking_state.rb DEV: Fix various typos (#24461) 2023-11-20 16:49:49 +01:00
published_page.rb
push_subscription.rb
quoted_post.rb
remote_theme.rb DEV: Add skip_migrations param when importing remote theme (#25218) 2024-01-11 14:04:02 +08:00
remove_muted_tags_from_latest_site_setting.rb
report.rb FIX: Radar chart not widely available. (#25368) 2024-01-22 11:21:28 -03:00
reviewable_claimed_topic.rb
reviewable_flagged_post.rb FIX: Allow the flags to be cleaned up (#25085) 2024-01-02 18:32:50 +08:00
reviewable_history.rb
reviewable_post.rb
reviewable_priority_setting.rb
reviewable_queued_post.rb DEV: Housekeeping for CleanUpUploads job (#24361) 2023-11-20 09:50:09 +10:00
reviewable_score.rb
reviewable_sensitivity_setting.rb
reviewable_user.rb FEATURE: Add Revise... option for queued post reviewable (#23454) 2023-10-13 11:28:31 +10:00
reviewable.rb FEATURE: Add Revise... option for queued post reviewable (#23454) 2023-10-13 11:28:31 +10:00
s3_region_site_setting.rb
screened_email.rb
screened_ip_address.rb
screened_url.rb
search_log.rb DEV: Fix Lint/DuplicateMethods (#24746) 2023-12-06 13:18:34 +01:00
search_sort_order_site_setting.rb FEATURE: Add setting & preference for search sort default order (#24428) 2023-11-20 10:43:58 +10:00
shared_draft.rb
shelved_notification.rb
sidebar_section_link.rb
sidebar_section.rb
sidebar_url.rb FEATURE: Initial admin sidebar navigation (#24789) 2023-12-18 11:48:25 +10:00
single_sign_on_record.rb
site_setting.rb DEV: Make more group-based settings client: false (#25585) 2024-02-08 09:43:34 +10:00
site.rb FIX: Preload parent categories for sidebar (#25726) 2024-02-16 16:39:18 +02:00
sitemap.rb
skipped_email_log.rb
slug_setting.rb
stat.rb DEV: Ability to collect stats without exposing them via API (#23933) 2023-11-10 00:44:05 +04:00
stylesheet_cache.rb
summarization_strategy.rb
summary_section.rb
tag_group_membership.rb
tag_group_permission.rb
tag_group.rb DEV: Fix Lint/DuplicateMethods (#24746) 2023-12-06 13:18:34 +01:00
tag_search_data.rb
tag_user.rb DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
tag.rb DEV: lint against Layout/EmptyLineBetweenDefs (#24914) 2023-12-15 23:46:04 +08:00
theme_field.rb DEV: Centralise logic for validating a theme setting value (#25764) 2024-02-21 08:08:26 +08:00
theme_modifier_set.rb
theme_setting.rb DEV: Set a bytesize limit for ThemeSetting#json_value (#25761) 2024-02-21 08:09:37 +08:00
theme_settings_migration.rb FEATURE: Theme settings migrations (#24071) 2023-11-02 08:10:15 +03:00
theme_svg_sprite.rb
theme_translation_override.rb
theme.rb FEATURE: Add experimental option for strict-dynamic CSP (#25664) 2024-02-16 11:16:54 +00:00
top_lists.rb
top_menu_item.rb
top_topic.rb
topic_allowed_group.rb
topic_allowed_user.rb
topic_converter.rb
topic_custom_field.rb DEV: Add true_fields method for CustomFields (#24876) 2023-12-14 11:06:21 -06:00
topic_embed.rb FEATURE: Cache embed contents in the database (#25133) 2024-01-05 10:09:31 -03:00
topic_featured_users.rb
topic_group.rb
topic_hot_score.rb FEATURE: apply pinning to hot topic lists (#25690) 2024-02-15 18:27:54 +11:00
topic_invite.rb
topic_link_click.rb
topic_link.rb FEATURE: support silent internal links (#25472) 2024-01-30 17:03:58 +11:00
topic_list.rb DEV: Fix Lint/DuplicateMethods (#24746) 2023-12-06 13:18:34 +01:00
topic_notifier.rb
topic_participant_groups_summary.rb
topic_participants_summary.rb
topic_poster.rb
topic_posters_summary.rb
topic_search_data.rb
topic_tag.rb
topic_thumbnail.rb
topic_timer.rb DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
topic_tracking_state.rb DEV: Make more group-based settings client: false (#25585) 2024-02-08 09:43:34 +10:00
topic_user.rb
topic_view_item.rb
topic.rb DEV: Add post_id parameter to reset_bump_date route (#25372) 2024-02-15 16:42:42 +11:00
translation_override.rb
trust_level_and_staff_and_disabled_setting.rb
trust_level_and_staff_setting.rb
trust_level_setting.rb
trust_level3_requirements.rb DEV: Fix Lint/DuplicateMethods (#24746) 2023-12-06 13:18:34 +01:00
unsubscribe_key.rb
upload_reference.rb
upload.rb PERF: Use -ping option to ImageMagick identify command (#25713) 2024-02-16 07:39:49 +08:00
user_action.rb DEV: Add a plugin modifier for user_action_stream_builder (#25691) 2024-02-16 10:24:39 +10:00
user_api_key_scope.rb
user_api_key.rb
user_archived_message.rb
user_associated_account.rb
user_associated_group.rb
user_auth_token_log.rb
user_auth_token.rb DEV: Add more debugging information to AR query logs on GitHub actions (#25237) 2024-01-12 13:06:29 +08:00
user_avatar.rb PERF: Better query performance for user avatar consistency check. (#25342) 2024-01-22 18:33:39 +01:00
user_badge.rb DEV: update syntax tree to latest (#24623) 2023-11-29 16:38:07 +11:00
user_badges.rb
user_bookmark_list.rb
user_custom_field.rb DEV: Add true_fields method for CustomFields (#24876) 2023-12-14 11:06:21 -06:00
user_email.rb
user_export.rb
user_field_option.rb
user_field.rb
user_history.rb
user_ip_address_history.rb
user_notification_schedule.rb
user_open_id.rb
user_option.rb FIX: Respect homepage prefs on admin sidebar Back to Forum link (#25642) 2024-02-16 14:31:42 +10:00
user_profile_view.rb
user_profile.rb
user_search_data.rb
user_search.rb
user_second_factor.rb
user_security_key.rb
user_stat.rb DEV: Make more group-based settings client: false (#25585) 2024-02-08 09:43:34 +10:00
user_status.rb
user_summary.rb
user_upload.rb
user_visit.rb
user_warning.rb
user.rb DEV: add site setting to disable watched word checking in user fields (#25411) 2024-01-29 12:44:32 -05:00
username_validator.rb
watched_word.rb DEV: update syntax tree to latest (#24623) 2023-11-29 16:38:07 +11:00
web_crawler_request.rb
web_hook_event_type.rb FEATURE: granular webhooks (#23070) 2023-10-09 03:35:31 +00:00
web_hook_event_types_hook.rb FEATURE: granular webhooks (#23070) 2023-10-09 03:35:31 +00:00
web_hook_event.rb
web_hook.rb FEATURE: granular webhooks (#23070) 2023-10-09 03:35:31 +00:00