diff --git a/app/jobs/create_channel_banners_from_default_site_banners.rb b/app/jobs/create_channel_banners_from_default_site_banners.rb index 19437b855d..ca6595e9c7 100644 --- a/app/jobs/create_channel_banners_from_default_site_banners.rb +++ b/app/jobs/create_channel_banners_from_default_site_banners.rb @@ -1,7 +1,7 @@ class CreateChannelBannersFromDefaultSiteBanners < ApplicationJob queue_as :default - def perform(channel_ids: []) + def perform(channel_ids) channel_ids.each do |id| channel = Channel.find(id) # Create a new site_banner and copy details from the default_site_banner, if existing diff --git a/lib/tasks/database_updates/create_unique_site_banner_details_for_each_channel.rake b/lib/tasks/database_updates/create_unique_site_banner_details_for_each_channel.rake index 329125ac35..28a0592576 100644 --- a/lib/tasks/database_updates/create_unique_site_banner_details_for_each_channel.rake +++ b/lib/tasks/database_updates/create_unique_site_banner_details_for_each_channel.rake @@ -6,7 +6,7 @@ namespace :database_updates do channel_count = channels.count puts "#{channels.count} channels have no site banner associated." - channels.each_slice do |channel_chunk| + channels.each_slice(500) do |channel_chunk| CreateChannelBannersFromDefaultSiteBanners.perform_later(channel_chunk) end