Use peform_bulk in Podcasts::Feed (#16324)

This commit is contained in:
Michael Kohl 2022-01-28 10:16:07 +07:00 committed by GitHub
parent 0d2e05857d
commit 30d2ec6220
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,9 +55,8 @@ module Podcasts
# If the episodes URLs are still reachable, the podcast will remain on the site.
# If they are not, the podcast will be hidden.
def refetch_items
podcast.podcast_episodes.find_each do |episode|
PodcastEpisodes::UpdateMediaUrlWorker.perform_async(episode.id, episode.media_url)
end
job_params = podcast.podcast_episodes.pluck(:id, :media_url)
PodcastEpisodes::UpdateMediaUrlWorker.perform_bulk(job_params)
end
end
end