v0.42 Mutex addition for SQLite (which may be very important

This commit is contained in:
David Sainty 2024-08-17 20:34:47 +10:00
parent d3e6dac1de
commit b44e9baf57

View File

@ -1108,7 +1108,7 @@ class GossamerForumsImporter < ImportScripts::Base
# Submit the import job for the current post_id to the thread pool
pool.post do
puts "PP 11"
puts "PP 11 -- #{post_id}"
# Initialise a new MariaDB / Mysql2 client inside of each thread
mysql_client = Mysql2::Client.new(
host: "slowtwitch.northend.network",
@ -1117,8 +1117,8 @@ class GossamerForumsImporter < ImportScripts::Base
database: "slowtwitch"
)
puts "PP 22"
# Use connection ppoling for PostgreSQL and synchronize access to shared resources
puts "PP 22 -- ${post_id}"
# Use connection pooling for PostgreSQL and synchronize access to shared resources
ActiveRecord::Base.connection_pool.with_connection do
### mutex.synchronize do
begin