diff --git a/app/jobs/fix_tag_post_count_job.rb b/app/jobs/fix_tag_post_count_job.rb new file mode 100644 index 000000000..3f6ab4ad7 --- /dev/null +++ b/app/jobs/fix_tag_post_count_job.rb @@ -0,0 +1,8 @@ +class FixTagPostCountJob < ApplicationJob + queue_as :default + queue_with_priority 20 + + def perform(tag) + tag.fix_post_count + end +end diff --git a/app/logical/tag_correction.rb b/app/logical/tag_correction.rb index 78c15a84b..6b326a89e 100644 --- a/app/logical/tag_correction.rb +++ b/app/logical/tag_correction.rb @@ -19,7 +19,7 @@ class TagCorrection end def fix! - tag.delay(:queue => "default").fix_post_count + FixTagPostCountJob.perform_later(tag) tag.update_category_cache end end