mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
optimise regular job to avoid touching posts that have not changed
This commit is contained in:
parent
1815a5a306
commit
085493e35d
1 changed files with 2 additions and 1 deletions
|
@ -284,7 +284,8 @@ class Post < ActiveRecord::Base
|
|||
AND p2.user_id <> post_timings.user_id
|
||||
GROUP BY post_timings.topic_id, post_timings.post_number) AS x
|
||||
WHERE x.topic_id = posts.topic_id
|
||||
AND x.post_number = posts.post_number")
|
||||
AND x.post_number = posts.post_number
|
||||
AND (posts.avg_time <> (x.gmean / 1000)::int OR posts.avg_time IS NULL)")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue