v0.48.6 40-40-40

This commit is contained in:
David Sainty 2024-08-19 13:33:32 +10:00
parent 9d6e1a0b7c
commit 915961cf51

View File

@ -31,13 +31,14 @@ class GossamerForumsImporter < ImportScripts::Base
begin
# Database configuration for ActiveRecord
# This is not used, except for pool size... issue with our Bitnami Discourse?
ActiveRecord::Base.establish_connection(
adapter: 'postgresql',
database: 'slowtwitch',
username: 'admin',
password: "yxnh93Ybbz2Nm8#mp28zCVv",
host: 'slowtwitch.northend.network',
pool: 48, # Adjust based on concurrency needs
database: 'discourse',
username: 'discourse',
password: 'nhB5FWhQkjdvaD2ViRNO63dQagDnzaTn',
host: '10.0.0.2',
pool: 40, # Adjust based on concurrency needs
timeout: 5000
)
@ -1126,11 +1127,11 @@ class GossamerForumsImporter < ImportScripts::Base
# Use CachedThreadPool for dynamic thread management
#### pool = Concurrent::CachedThreadPool.new
###### pool = Concurrent::FixedThreadPool.new(7)
pool = Concurrent::FixedThreadPool.new(48)
pool = Concurrent::FixedThreadPool.new(40)
# Define the connection pool inside the method
###### mariadb_pool = ConnectionPool.new(size: 14, timeout: 100) do
mariadb_pool = ConnectionPool.new(size: 48, timeout: 100) do
mariadb_pool = ConnectionPool.new(size: 40, timeout: 100) do
Mysql2::Client.new(
host: "slowtwitch.northend.network",
username: "admin",