v0.40 Move to per thread MySQL/MariaDB connection
This commit is contained in:
parent
35b97db341
commit
168dcc9db7
@ -1098,13 +1098,13 @@ class GossamerForumsImporter < ImportScripts::Base
|
||||
# Initialise a new MariaDB / Mysql2 client inside of each thread
|
||||
mysql_client = Mysql2::Client.new(
|
||||
host: "slowtwitch.northend.network",
|
||||
user: "admin",
|
||||
username: "admin",
|
||||
password: "yxnh93Ybbz2Nm8#mp28zCVv",
|
||||
database: "slowtwitch"
|
||||
)
|
||||
begin
|
||||
puts "Processing post ID: #{post_id}"
|
||||
topic_import_job(post_idi, mysql_client) # Import topic and its replies
|
||||
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
|
||||
puts "Error processing post ID #{post_id}: #{e.message}"
|
||||
|
Loading…
Reference in New Issue
Block a user