2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Don't auto-close a topic too soon in PeriodicalUpdates

This commit is contained in:
Neil Lalonde 2013-12-18 14:09:49 -05:00
parent eeed9abcf0
commit c0e1ef75f6

View file

@ -629,7 +629,7 @@ class Topic < ActiveRecord::Base
end
def self.auto_close
Topic.where("NOT closed AND auto_close_at < ? AND auto_close_user_id IS NOT NULL", 5.minutes.from_now).each do |t|
Topic.where("NOT closed AND auto_close_at < ? AND auto_close_user_id IS NOT NULL", 1.minute.ago).each do |t|
t.auto_close
end
end