From 7847784e0ed3782daad40a09464513dae4ce7e04 Mon Sep 17 00:00:00 2001 From: saint Date: Sun, 18 Aug 2024 01:04:30 +1000 Subject: [PATCH] v0.42.1 Rewrite and simplication of concurrent-ruby support --- gossamer_forums.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 63a6ee0..3ec9004 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1076,7 +1076,7 @@ class GossamerForumsImporter < ImportScripts::Base parent_post_ids = result.map { |row| row['post_id'] } parent_post_count = parent_post_ids.count - batch_size = 1 # Set our batch size for number of posts to import in a single batch + batch_size = 10 # Set our batch size for number of posts to import in a single batch #### current_post_batch = 0 # Set our current batch number. This tracks the current batch of posts being processed. @@ -1244,7 +1244,8 @@ class GossamerForumsImporter < ImportScripts::Base topic.save! topic_created = true - rescue ActiveRecord::RecordInvalid => e +# rescue ActiveRecord::RecordInvalid => e + rescue => e if e.message.include?("Title has already been used") unique_title = "#{title} (#{suffix})" suffix += 1