From facf297f56b98a4690300c986c7f1bb3fd1f8e1e Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 26 Oct 2019 18:47:01 +0800 Subject: [PATCH] chagne poll publish rake --- lib/tasks/poll_publish.rake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tasks/poll_publish.rake b/lib/tasks/poll_publish.rake index 90772c3c7..a964babdc 100644 --- a/lib/tasks/poll_publish.rake +++ b/lib/tasks/poll_publish.rake @@ -93,6 +93,8 @@ namespace :poll_publish do #2.分班设置的截止 polls = Poll.includes(:poll_users).where("polls_status = 2 AND unified_setting = false AND end_time > ?",Time.now + 900) + puts "--------------unified_setting_poll_ids------------------#{polls.pluck(:id)}" + poll_ids = polls.blank? ? "(-1)" : "(" + polls.map(&:id).join(",") + ")" polls_group_settings = PollGroupSetting.where("end_time <= '#{Time.now}' and poll_id in #{poll_ids}") polls_group_settings.each do |poll_setting|