Skip to content

Commit

Permalink
Enqueue codec_conversion transcodes on slower queue
Browse files Browse the repository at this point in the history
  • Loading branch information
chvp committed Oct 10, 2024
1 parent cc9633c commit 88da975
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class QueueTranscodedItemsForCodecConversionJob < ApplicationJob
def perform(codec_conversion)
AudioFile.find_in_batches do |batch|
jobs = batch.filter_map do |af|
CreateTranscodedItemJob.new(af, codec_conversion) if Rails.configuration.queue_create_transcoded_item_if.call(af)
CreateTranscodedItemJob.new(af, codec_conversion).set(queue: :whenever) if Rails.configuration.queue_create_transcoded_item_if.call(af)
end
ActiveJob.perform_all_later(jobs)
end
Expand Down

0 comments on commit 88da975

Please sign in to comment.