15 lines
348 B
Ruby
15 lines
348 B
Ruby
# frozen_string_literal: true
|
|
|
|
class E621ExportsJob < ApplicationJob
|
|
queue_as :exports
|
|
|
|
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
|