Websites/app/jobs/e621_exports_job.rb

13 lines
322 B
Ruby
Raw Normal View History

2024-08-06 11:21:24 +00:00
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