You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
374 B

# frozen_string_literal: true
class PurgeCustomEmojiWorker
include Sidekiq::IterableJob
def build_enumerator(domain, cursor:)
return if domain.blank?
active_record_batches_enumerator(CustomEmoji.by_domain_and_subdomains(domain), cursor:)
end
def each_iteration(custom_emojis, _domain)
AttachmentBatch.new(CustomEmoji, custom_emojis).delete
end
end