19 lines
533 B
Ruby
19 lines
533 B
Ruby
# typed: strict
|
|
class Domain::PostFileThumbnailJob < Scraper::JobBase
|
|
queue_as :thumbnails
|
|
discard_on Vips::Error
|
|
|
|
sig { override.returns(Symbol) }
|
|
def self.http_factory_method
|
|
raise NotImplementedError
|
|
end
|
|
|
|
sig { override.params(args: T::Hash[Symbol, T.untyped]).returns(T.untyped) }
|
|
def perform(args)
|
|
post_file = T.cast(args[:post_file], Domain::PostFile)
|
|
Domain::PostFile::Thumbnail.create_for_post_file!(post_file)
|
|
Domain::PostFile::BitFingerprint.create_for_post_file!(post_file)
|
|
nil
|
|
end
|
|
end
|