From 6023abf087e4c34a574dfefd203bd33ff210950a Mon Sep 17 00:00:00 2001 From: r888888888 Date: Wed, 24 May 2017 15:46:45 -0700 Subject: [PATCH] remove delayed job count constraint when calculating related tags (fixes #3087) --- app/models/tag.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/tag.rb b/app/models/tag.rb index c34dee819..ddfe9e9cb 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -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)