mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-08 05:58:27 +08:00
Scheduled problem checks with multiple targets are not honouring the `run_every` configuration. For checks with multiple targets, all targets are checked in a single instance of the problem check. However, we have one problem check tracker per target. This mismatch results in the `#ready_to_run?` method always creating a tracker with no target when being checked. This commit fixes that by: **Expect checks to operate on a single target.** This change makes it so that instances of a `ProblemCheck` class are initialized with a target. So instead of 1-N we now have an N-N relationship between checks and trackers. Each instance can access their `target` through an attribute of the same name. This also means problem checks are back to returning a singular `Problem` or `nil`, instead of `[Problem]` or `[]`. For scheduled checks, this means that `ScheduleProblemChecks` now enqueues `N` jobs (where `N` is the number of targets) per check instead of `1` job per check. **Update existing targeted checks to operate on a single target.** This is essentially just removing the loop inside the check. |
||
|---|---|---|
| .. | ||
| bad_favicon_url.rb | ||
| email_polling_errored_recently.rb | ||
| facebook_config.rb | ||
| failing_emails.rb | ||
| force_https.rb | ||
| github_config.rb | ||
| google_analytics_version.rb | ||
| google_oauth2_config.rb | ||
| group_email_credentials.rb | ||
| host_names.rb | ||
| image_magick.rb | ||
| inline_problem_check.rb | ||
| maxmind_db_configuration.rb | ||
| missing_mailgun_api_key.rb | ||
| out_of_date_themes.rb | ||
| poll_pop3_auth_error.rb | ||
| poll_pop3_timeout.rb | ||
| problem.rb | ||
| rails_env.rb | ||
| ram.rb | ||
| s3_backup_config.rb | ||
| s3_cdn.rb | ||
| s3_upload_config.rb | ||
| sidekiq_check.rb | ||
| starttls_disabled.rb | ||
| subfolder_ends_in_slash.rb | ||
| translation_overrides.rb | ||
| twitter_config.rb | ||
| twitter_login.rb | ||
| unreachable_themes.rb | ||
| upcoming_change_stable_opted_out.rb | ||
| watched_words.rb | ||