From 2605da10374ee235f46f0cb01e7e9db34b5bd9c8 Mon Sep 17 00:00:00 2001 From: Albert Yi Date: Mon, 5 Dec 2016 12:09:36 -0800 Subject: [PATCH] lower requirements for janitor trial --- app/models/janitor_trial.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/janitor_trial.rb b/app/models/janitor_trial.rb index a3d5cb7fb..3791d3f11 100644 --- a/app/models/janitor_trial.rb +++ b/app/models/janitor_trial.rb @@ -27,7 +27,7 @@ class JanitorTrial < ActiveRecord::Base def self.message_candidates! admin = User.admins.first - User.where("last_logged_in_at >= ? and created_at <= ? and email is not null and (favorite_count >= 400 OR post_upload_count >= 400) and bit_prefs & ? = 0", 1.week.ago, 6.months.ago, User.flag_value_for("can_approve_posts")).order("random()").limit(10).each do |user| + User.where("last_logged_in_at >= ? and created_at <= ? and email is not null and (favorite_count >= 300 OR post_upload_count >= 300) and bit_prefs & ? = 0", 1.week.ago, 6.months.ago, User.flag_value_for("can_approve_posts")).order("random()").limit(10).each do |user| if !Dmail.where("from_id = ? and to_id = ? and title = ?", admin.id, user.id, "Test Janitor Invitation").exists? favorites = user.favorites.order("random()").limit(400).map(&:post_id) uploads = user.posts.order("random()").limit(400).map(&:id)