This commit is contained in:
Guo Xiang Tan 2017-06-07 09:55:58 +09:00
parent da736f70a4
commit d4d0aa8ca7
1 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ class CookedPostProcessor
end
def keep_reverse_index_up_to_date
upload_ids = Array.new
upload_ids = []
@doc.css("a/@href", "img/@src").each do |media|
if upload = Upload.get_from_url(media.value)
@ -59,7 +59,7 @@ class CookedPostProcessor
end
end
upload_ids.concat(oneboxed_image_uploads.pluck(:id))
upload_ids |= oneboxed_image_uploads.pluck(:id)
values = upload_ids.map{ |u| "(#{@post.id},#{u})" }.join(",")
PostUpload.transaction do