remove unrelated code

already added in a separate job
This commit is contained in:
Vinoth Kannan 2019-04-04 02:26:28 +05:30
parent b3fb0a7039
commit 3b581de3b8
1 changed files with 0 additions and 24 deletions

View File

@ -36,30 +36,6 @@ module Jobs
optimized_image.destroy!
upload.rebake_posts_on_old_scheme
end
Post.where("cooked LIKE '%<img %'").find_each do |post|
missing = post.find_missing_uploads
next if missing.blank?
missing.each do |src|
src.sub!("https://discourse-cdn-sjc1.com/mcneel", "")
next unless src.split("/").length == 5
source = "#{Discourse.store.public_dir}#{src}"
if File.exists?(source)
PostCustomField.create!(post_id: post.id, value: src, key: "pu_found")
next
end
source = "#{Discourse.store.tombstone_dir}#{src}"
if File.exists?(source)
PostCustomField.create!(post_id: post.id, value: src, key: "pu_tombstone")
next
end
PostCustomField.create!(post_id: post.id, value: src, key: "pu_missing")
end
end
end
end