From 416dc9c1e064a585f0ce3518d09a7653de8a52a2 Mon Sep 17 00:00:00 2001 From: saint Date: Sun, 18 Aug 2024 02:01:31 +1000 Subject: [PATCH] v0.42.1 Rewrite and simplication of concurrent-ruby support --- gossamer_forums.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 7ef109c..ececd4a 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1093,6 +1093,7 @@ class GossamerForumsImporter < ImportScripts::Base # Run until all posts have been processed. until is_complete + puts "QQ 11 -- GETTING NEXT BATCH ****************************************" #### # Query in batches, create pool, wait for termination, do it again #### current_post_batch_max = current_post_batch + batch_size @@ -1103,6 +1104,7 @@ class GossamerForumsImporter < ImportScripts::Base # Process each post in the current batch current_post_batch.each do |post_id| + puts "QQ 22 -- #{post_id}" ####### # Static pool size based on number of CPUs @@ -1158,6 +1160,8 @@ class GossamerForumsImporter < ImportScripts::Base end ensure # Ensure the MariaDB connection is closed after processing + mysql_client.close if mysql_client + puts "** CLOSED MariaDB client" puts "PP 22 -- #{post_id}" puts " FINAL Checking MySQL connection status..." if mysql_client.query('SELECT 1').nil? @@ -1165,8 +1169,6 @@ class GossamerForumsImporter < ImportScripts::Base else puts " MySQL connection is valid" end - mysql_client.close if mysql_client - puts "** CLOSED MariaDB client" end end end