remove activity feeds too

This commit is contained in:
DuratarskeyK 2016-05-03 22:04:24 +04:00
parent d56df5782f
commit 8940501d30
1 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,9 @@ 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}"