From f3b1f0416ddd63751f1834648784c3f90c249ef8 Mon Sep 17 00:00:00 2001 From: Ross Trottier Date: Thu, 15 Aug 2024 12:58:03 -0600 Subject: [PATCH] added suggestion for thread count tweaking --- gossamer_forums.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 04f5a7f..5327f2f 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -940,9 +940,9 @@ class GossamerForumsImporter < ImportScripts::Base until is_complete # Query in batches, create pool, wait for termination, do it again - # SELECT post_id FROM gforum_Post WHERE post_root_id = 0 ORDER BY post_id + # SELECT post_id FROM gforum_Post WHERE post_root_id = 0 ORDER BY post_id current_post_batch_max = current_post_batch + batch_size - pool = Concurrent::FixedThreadPool.new(Concurrent.processor_count) #create thread pool that is bounded by processors avaialable + pool = Concurrent::FixedThreadPool.new(Concurrent.processor_count) #create thread pool that is bounded by processors avaialable, however play with the number to see what works best while current_post_batch < current_post_batch_max post_id = parent_post_ids[current_post_batch]