このコミットが含まれているのは:
@@ -1,4 +1,3 @@
|
||||
require 'open-uri'
|
||||
require 'set'
|
||||
require 'time'
|
||||
|
||||
@@ -127,12 +126,12 @@ module Youtube
|
||||
return if post.thumbnail.attached?
|
||||
return if thumbnail_url.blank?
|
||||
|
||||
post.thumbnail.attach(
|
||||
io: URI.open(thumbnail_url),
|
||||
filename: File.basename(URI.parse(thumbnail_url).path),
|
||||
content_type: 'image/jpeg')
|
||||
|
||||
post.resized_thumbnail!
|
||||
post.attach_thumbnail_from_url!(thumbnail_url)
|
||||
rescue Post::RemoteThumbnailFetchFailed => e
|
||||
Rails.logger.info("youtube_sync_thumbnail_fetch_failed #{ { post_id: post.id,
|
||||
thumbnail_url:,
|
||||
error: e.class.name,
|
||||
message: e.message }.to_json }")
|
||||
end
|
||||
|
||||
def youtube_url_regexp id
|
||||
|
||||
新しい課題から参照
ユーザをブロックする