mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
16 lines
374 B
Ruby
16 lines
374 B
Ruby
# 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
|