remove delayed job count constraint when calculating related tags (fixes #3087)
This commit is contained in:
@@ -682,7 +682,7 @@ class Tag < ActiveRecord::Base
|
|||||||
|
|
||||||
def update_related_if_outdated
|
def update_related_if_outdated
|
||||||
if should_update_related?
|
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
|
delay(:queue => "default").update_related
|
||||||
elsif post_count >= COSINE_SIMILARITY_RELATED_TAG_THRESHOLD
|
elsif post_count >= COSINE_SIMILARITY_RELATED_TAG_THRESHOLD
|
||||||
key = Cache.sanitize(name)
|
key = Cache.sanitize(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user