jobs: migrate fixing post counts to ActiveJob.

This commit is contained in:
evazion
2019-08-19 00:46:30 -05:00
parent 2b033443db
commit ddcc7eddfb
2 changed files with 9 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
class FixTagPostCountJob < ApplicationJob
queue_as :default
queue_with_priority 20
def perform(tag)
tag.fix_post_count
end
end

View File

@@ -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