2024-08-31 04:14:16 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2024-08-06 11:21:24 +00:00
|
|
|
class E621ExportsJob < ApplicationJob
|
2024-10-24 08:07:27 +00:00
|
|
|
queue_as :exports
|
2024-08-06 11:21:24 +00:00
|
|
|
|
|
|
|
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
|