Websites/app/jobs/e621_exports_job.rb

15 lines
353 B
Ruby
Raw Normal View History

2024-08-31 04:14:16 +00:00
# frozen_string_literal: true
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