mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:38:17 +08:00
FIX: version check job when no versions are returned in json
This commit is contained in:
parent
bcfaf522fd
commit
92f0c6537c
|
@ -80,15 +80,18 @@ module DiscourseUpdates
|
||||||
$redis.del(missing_versions_list_key)
|
$redis.del(missing_versions_list_key)
|
||||||
end
|
end
|
||||||
|
|
||||||
# store the list in redis
|
if versions.present?
|
||||||
version_keys = []
|
# store the list in redis
|
||||||
versions[0,5].each do |v|
|
version_keys = []
|
||||||
key = "#{missing_versions_key_prefix}:#{v['version']}"
|
versions[0,5].each do |v|
|
||||||
$redis.mapped_hmset key, v
|
key = "#{missing_versions_key_prefix}:#{v['version']}"
|
||||||
version_keys << key
|
$redis.mapped_hmset key, v
|
||||||
|
version_keys << key
|
||||||
|
end
|
||||||
|
$redis.rpush missing_versions_list_key, version_keys
|
||||||
end
|
end
|
||||||
$redis.rpush missing_versions_list_key, version_keys
|
|
||||||
versions
|
versions || []
|
||||||
end
|
end
|
||||||
|
|
||||||
def missing_versions
|
def missing_versions
|
||||||
|
|
Loading…
Reference in New Issue
Block a user