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