ignore timeouts for reltagcalc
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
class RelatedTagCalculator
|
class RelatedTagCalculator
|
||||||
def self.find_tags(tag, limit)
|
def self.find_tags(tag, limit)
|
||||||
Post.with_timeout(10_000, []) do
|
Post.with_timeout(5_000, []) do
|
||||||
Post.tag_match(tag).limit(limit).select("posts.tag_string").reorder("posts.md5").map(&:tag_string)
|
Post.tag_match(tag).limit(limit).select("posts.tag_string").reorder("posts.md5").map(&:tag_string)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -404,6 +404,7 @@ class Tag < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
self.related_tags_updated_at = Time.now
|
self.related_tags_updated_at = Time.now
|
||||||
save
|
save
|
||||||
|
rescue ActiveRecord::StatementInvalid
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_related_if_outdated
|
def update_related_if_outdated
|
||||||
|
|||||||
Reference in New Issue
Block a user