From 7dea7eef8968eedfa46fc4b5560ba20de47e8a63 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Wed, 15 Nov 2017 16:29:39 -0800 Subject: [PATCH] run tag count counters synchronously --- app/models/post.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/post.rb b/app/models/post.rb index c6dc157d1..b1a20a5ae 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -608,10 +608,10 @@ class Post < ApplicationRecord increment_tags = tag_array - tag_array_was if increment_tags.any? - Tag.delay(:queue => "default").increment_post_counts(increment_tags) + Tag.increment_post_counts(increment_tags) end if decrement_tags.any? - Tag.delay(:queue => "default").decrement_post_counts(decrement_tags) + Tag.decrement_post_counts(decrement_tags) end Post.expire_cache_for_all([""]) if new_record? || id <= 100_000 end