mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:53:37 +08:00
FIX: version check job when no versions are returned in json
This commit is contained in:
parent
bcfaf522fd
commit
92f0c6537c
|
@ -80,6 +80,7 @@ module DiscourseUpdates
|
||||||
$redis.del(missing_versions_list_key)
|
$redis.del(missing_versions_list_key)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if versions.present?
|
||||||
# store the list in redis
|
# store the list in redis
|
||||||
version_keys = []
|
version_keys = []
|
||||||
versions[0,5].each do |v|
|
versions[0,5].each do |v|
|
||||||
|
@ -88,7 +89,9 @@ module DiscourseUpdates
|
||||||
version_keys << key
|
version_keys << key
|
||||||
end
|
end
|
||||||
$redis.rpush missing_versions_list_key, version_keys
|
$redis.rpush missing_versions_list_key, version_keys
|
||||||
versions
|
end
|
||||||
|
|
||||||
|
versions || []
|
||||||
end
|
end
|
||||||
|
|
||||||
def missing_versions
|
def missing_versions
|
||||||
|
|
Loading…
Reference in New Issue
Block a user