mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: version check job when no versions are returned in json
This commit is contained in:
parent
bcfaf522fd
commit
92f0c6537c
1 changed files with 11 additions and 8 deletions
|
@ -80,15 +80,18 @@ module DiscourseUpdates
|
|||
$redis.del(missing_versions_list_key)
|
||||
end
|
||||
|
||||
# store the list in redis
|
||||
version_keys = []
|
||||
versions[0,5].each do |v|
|
||||
key = "#{missing_versions_key_prefix}:#{v['version']}"
|
||||
$redis.mapped_hmset key, v
|
||||
version_keys << key
|
||||
if versions.present?
|
||||
# store the list in redis
|
||||
version_keys = []
|
||||
versions[0,5].each do |v|
|
||||
key = "#{missing_versions_key_prefix}:#{v['version']}"
|
||||
$redis.mapped_hmset key, v
|
||||
version_keys << key
|
||||
end
|
||||
$redis.rpush missing_versions_list_key, version_keys
|
||||
end
|
||||
$redis.rpush missing_versions_list_key, version_keys
|
||||
versions
|
||||
|
||||
versions || []
|
||||
end
|
||||
|
||||
def missing_versions
|
||||
|
|
Loading…
Reference in a new issue