Files
danbooru/app/jobs/regenerate_post_counts_job.rb
evazion a7dc05ce63 Enable frozen string literals.
Make all string literals immutable by default.
2021-12-14 21:33:27 -06:00

13 lines
345 B
Ruby

# frozen_string_literal: true
# A job that runs hourly to fix all incorrect tag counts.
# Spawned by {DanbooruMaintenance}.
class RegeneratePostCountsJob < ApplicationJob
def perform
updated_tags = Tag.regenerate_post_counts!
updated_tags.each do |tag|
DanbooruLogger.info("Updated tag count", tag.attributes)
end
end
end