From 3a1476951e9782b500b2c5c7015112c8e5204070 Mon Sep 17 00:00:00 2001 From: saint Date: Sat, 17 Aug 2024 19:08:38 +1000 Subject: [PATCH] v0.41.2 Several bug fixes and improvements for fully concurrent topic-post import --- gossamer_forums.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 7937f02..602200a 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1118,17 +1118,17 @@ class GossamerForumsImporter < ImportScripts::Base # Use connection ppoling for PostgreSQL and synchronize access to shared resources ActiveRecord::Base.connection_pool.with_connection do mutex.synchronize do - begin +## begin puts "Processing post ID: #{post_id}" topic_import_job(post_id, mysql_client) # Import topic and its replies mark_post_as_complete(post_id) # Mark as complete in SQLite table - rescue => e +## rescue => e puts "Error processing post ID #{post_id}: #{e.message}" mark_post_as_failed(post_id) - ensure +## ensure # Ensure the MariaDB connection is closed after processing mysql_client.close if mysql_client - end +## end end end end