Skip to content

Commit

Permalink
Merge pull request #4192 from brave-intl/fix/banner-job-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jlbyrne authored Aug 24, 2023
2 parents 46581be + 23c9a65 commit f20aa99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f20aa99

Please sign in to comment.