Compare commits

..

No commits in common. "702d90cd34000944c8631e975f21362d9e9cd70d" and "8caa2027cb203efe315935358e01bd3001582404" have entirely different histories.

View File

@ -1,7 +1,7 @@
# Federated Computer, Inc.
# David Sainty <saint@federated.computer> 2024 A.D.
# Gossamer Threads to Discourse -- Migration-Import Script
# v0.48 Further attempts to address MariaDB craziness.
# v0.47.1 Fix .id nil bug
require 'mysql2'
require 'open-uri'
@ -18,7 +18,6 @@ require 'concurrent'
require 'sys/proctable'
require 'active_record'
require 'connection_pool'
require File.expand_path("../../../../config/environment", __FILE__)
@ -29,18 +28,6 @@ class GossamerForumsImporter < ImportScripts::Base
def initialize
super
begin
# Database configuration for ActiveRecord
ActiveRecord::Base.establish_connection(
adapter: 'postgresql',
database: 'slowtwitch',
username: 'admin',
password: "yxnh93Ybbz2Nm8#mp28zCVv",
host: 'slowtwitch.northend.network',
pool: 20, # Adjust based on concurrency needs
timeout: 5000
)
# Initialize MySQL client to connect to Gossamer Forums database
@mysql_client = Mysql2::Client.new(
host: "slowtwitch.northend.network",
@ -1090,12 +1077,10 @@ class GossamerForumsImporter < ImportScripts::Base
# Use CachedThreadPool for dynamic thread management
#### pool = Concurrent::CachedThreadPool.new
###### pool = Concurrent::FixedThreadPool.new(7)
pool = Concurrent::FixedThreadPool.new(12)
pool = Concurrent::FixedThreadPool.new(7)
# Define the connection pool inside the method
###### mariadb_pool = ConnectionPool.new(size: 14, timeout: 100) do
mariadb_pool = ConnectionPool.new(size: 24, timeout: 100) do
mariadb_pool = ConnectionPool.new(size: 14, timeout: 100) do
Mysql2::Client.new(
host: "slowtwitch.northend.network",
username: "admin",