From 04c94e6f194f2ef324334bda2f593e051b25fc55 Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Tue, 23 May 2017 10:42:49 +0200 Subject: [PATCH] post_to_twitter: clarify MIN_STORY_SCORE is a minimum --- script/post_to_twitter | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/post_to_twitter b/script/post_to_twitter index aea3583..751c207 100755 --- a/script/post_to_twitter +++ b/script/post_to_twitter @@ -7,9 +7,9 @@ require File.expand_path('../../config/boot', __FILE__) require APP_PATH Rails.application.require_environment! -MIN_STORY_SCORE = 2 +MIN_STORY_SCORE = 3 -Story.where("is_expired = ? AND #{Story.score_sql} > ? AND " << +Story.where("is_expired = ? AND #{Story.score_sql} >= ? AND " << "twitter_id IS NULL AND created_at >= ?", false, MIN_STORY_SCORE, Time.now - 1.days).order(:id).each_with_index do |s,x| if s.tags.map(&:tag).include?("meta")