From 8940501d307f0e41bd74cd96335649f60fcace5b Mon Sep 17 00:00:00 2001 From: DuratarskeyK Date: Tue, 3 May 2016 22:04:24 +0400 Subject: [PATCH] remove activity feeds too --- app/jobs/remove_outdated_items_job.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/jobs/remove_outdated_items_job.rb b/app/jobs/remove_outdated_items_job.rb index f39eec58d..6cae5ab5e 100644 --- a/app/jobs/remove_outdated_items_job.rb +++ b/app/jobs/remove_outdated_items_job.rb @@ -13,10 +13,13 @@ class RemoveOutdatedItemsJob end counter_pbl = ProductBuildList.outdated.count 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| f.puts "Build Lists deleted: #{counter_bl}" f.puts "Mass Builds deleted: #{counter_mb}" f.puts "Product Build Lists deleted: #{counter_pbl}" end end -end \ No newline at end of file +end