refactor cropped images into explore/posts/intro
This commit is contained in:
12
app/logical/image_cropper.rb
Normal file
12
app/logical/image_cropper.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class ImageCropper
|
||||
def self.enabled?
|
||||
Danbooru.config.aws_sqs_cropper_url.present?
|
||||
end
|
||||
|
||||
def self.notify(post)
|
||||
if post.is_image?
|
||||
sqs = SqsService.new(Danbooru.config.aws_sqs_cropper_url)
|
||||
sqs.send_message("#{post.id},https://#{Danbooru.config.hostname}/data/#{post.md5}.#{post.file_ext}")
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user