remove activity feeds too
This commit is contained in:
parent
d56df5782f
commit
8940501d30
|
@ -13,10 +13,13 @@ class RemoveOutdatedItemsJob
|
||||||
end
|
end
|
||||||
counter_pbl = ProductBuildList.outdated.count
|
counter_pbl = ProductBuildList.outdated.count
|
||||||
ProductBuildList.outdated.destroy_all
|
ProductBuildList.outdated.destroy_all
|
||||||
|
User.find_each(batch_size: 50) do |u|
|
||||||
|
u.activity_feeds.outdated.destroy_all
|
||||||
|
end
|
||||||
File.open(log_file, "w") do |f|
|
File.open(log_file, "w") do |f|
|
||||||
f.puts "Build Lists deleted: #{counter_bl}"
|
f.puts "Build Lists deleted: #{counter_bl}"
|
||||||
f.puts "Mass Builds deleted: #{counter_mb}"
|
f.puts "Mass Builds deleted: #{counter_mb}"
|
||||||
f.puts "Product Build Lists deleted: #{counter_pbl}"
|
f.puts "Product Build Lists deleted: #{counter_pbl}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue