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

PERF: add option to limit how many categories are processed in one call to CategoryFeaturedTopic.feature_topics (#5446)

This commit is contained in:
Neil Lalonde 2017-12-19 21:42:29 -05:00 committed by Sam
parent eab66065d1
commit f5a3be750c
2 changed files with 24 additions and 4 deletions

View file

@ -17,7 +17,7 @@ module Jobs

def execute(args)
# Feature topics in categories
CategoryFeaturedTopic.feature_topics
CategoryFeaturedTopic.feature_topics(batched: true)

# Update the scores of posts
args = { min_topic_age: 1.day.ago }