remove delayed job count constraint when calculating related tags (fixes #3087)

This commit is contained in:
r888888888
2017-05-24 15:46:45 -07:00
parent fc708db2bd
commit 6023abf087

View File

@@ -682,7 +682,7 @@ class Tag < ActiveRecord::Base
def update_related_if_outdated
if should_update_related?
if post_count < COSINE_SIMILARITY_RELATED_TAG_THRESHOLD && Delayed::Job.count < 200
if post_count < COSINE_SIMILARITY_RELATED_TAG_THRESHOLD
delay(:queue => "default").update_related
elsif post_count >= COSINE_SIMILARITY_RELATED_TAG_THRESHOLD
key = Cache.sanitize(name)