jobs: migrate fixing post counts to ActiveJob.
This commit is contained in:
8
app/jobs/fix_tag_post_count_job.rb
Normal file
8
app/jobs/fix_tag_post_count_job.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class FixTagPostCountJob < ApplicationJob
|
||||
queue_as :default
|
||||
queue_with_priority 20
|
||||
|
||||
def perform(tag)
|
||||
tag.fix_post_count
|
||||
end
|
||||
end
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user