class E621ExportsJob < ApplicationJob queue_as :low_priority def perform E621.constants.map { |c| E621.const_get(c) }.filter { |c| c < ApplicationRecord }.each do |type| Rails.logger.debug { "Updating #{type}" } type.sync! end E621::Pool.sync_tags! E621PoolImportJob.perform_now end end