docbrown/app/workers/podcast_episodes/create_worker.rb
Asha Balasubramaniam bc137ff762 Migrate PodcastEpisodes::CreateJob to PodcastEpisodes::CreateWorker for Sidekiq (#5633)
The tests around `Podcasts::Feed` helped catch a bug around the
migration of the podcast episode creation delayed job where the sidekiq
version was passing a string version of item hash to
`Podcasts::CreateEpisode` which was in fact expecting the hash to
contain symbols.
2020-01-23 15:37:43 -05:00

11 lines
245 B
Ruby

module PodcastEpisodes
class CreateWorker
include Sidekiq::Worker
sidekiq_options queue: :high_priority
def perform(podcast_id, item)
Podcasts::CreateEpisode.call(podcast_id, item.with_indifferent_access)
end
end
end