mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Version checks: tolerate old version check data that can happen immediately after upgrading but forgetting to restart sidekiq/clockwork. Don't cache version check data along with other dashboard data.
This commit is contained in:
parent
fc25da09e3
commit
06140740d0
5 changed files with 40 additions and 8 deletions
|
@ -20,10 +20,19 @@ module DiscourseUpdates
|
|||
)
|
||||
end
|
||||
|
||||
if version_info.updated_at.nil? or
|
||||
(version_info.missing_versions_count == 0 and version_info.latest_version != version_info.installed_version)
|
||||
# Version check data is out of date.
|
||||
Jobs.enqueue(:version_check, all_sites: true)
|
||||
if SiteSetting.version_checks?
|
||||
|
||||
# Handle cases when version check data is old so we report something that makes sense
|
||||
|
||||
if (version_info.updated_at.nil? or
|
||||
(version_info.missing_versions_count == 0 and version_info.latest_version != version_info.installed_version) or
|
||||
(version_info.missing_versions_count != 0 and version_info.latest_version == version_info.installed_version))
|
||||
Jobs.enqueue(:version_check, all_sites: true)
|
||||
end
|
||||
|
||||
if !version_info.updated_at.nil? and version_info.latest_version == version_info.installed_version
|
||||
version_info.missing_versions_count = 0
|
||||
end
|
||||
end
|
||||
|
||||
version_info
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue