mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Add rubocop to our build. (#5004)
This commit is contained in:
parent
ff4e295c4f
commit
5012d46cbd
871 changed files with 5480 additions and 6056 deletions
|
@ -33,10 +33,10 @@ module DiscourseUpdates
|
|||
|
||||
# Handle cases when version check data is old so we report something that makes sense
|
||||
|
||||
if (version_info.updated_at.nil? or # never performed a version check
|
||||
last_installed_version != Discourse::VERSION::STRING or # upgraded since the last version check
|
||||
(version_info.missing_versions_count == 0 and version_info.latest_version != version_info.installed_version) or # old data
|
||||
(version_info.missing_versions_count != 0 and version_info.latest_version == version_info.installed_version)) # old data
|
||||
if (version_info.updated_at.nil? || # never performed a version check
|
||||
last_installed_version != (Discourse::VERSION::STRING) || # upgraded since the last version check
|
||||
(version_info.missing_versions_count == (0) && version_info.latest_version != (version_info.installed_version)) || # old data
|
||||
(version_info.missing_versions_count != (0) && version_info.latest_version == (version_info.installed_version))) # old data
|
||||
Jobs.enqueue(:version_check, all_sites: true)
|
||||
version_info.version_check_pending = true
|
||||
unless version_info.updated_at.nil?
|
||||
|
@ -92,7 +92,7 @@ module DiscourseUpdates
|
|||
if versions.present?
|
||||
# store the list in redis
|
||||
version_keys = []
|
||||
versions[0,5].each do |v|
|
||||
versions[0, 5].each do |v|
|
||||
key = "#{missing_versions_key_prefix}:#{v['version']}"
|
||||
$redis.mapped_hmset key, v
|
||||
version_keys << key
|
||||
|
@ -108,7 +108,6 @@ module DiscourseUpdates
|
|||
keys.present? ? keys.map { |k| $redis.hgetall(k) } : []
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def last_installed_version_key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue