v0.48.5 Batch size 1000, double councurrency numbers
This commit is contained in:
parent
74d2ee7382
commit
d9ae43b78b
@ -1,7 +1,7 @@
|
|||||||
# Federated Computer, Inc.
|
# Federated Computer, Inc.
|
||||||
# David Sainty <saint@federated.computer> 2024 A.D.
|
# David Sainty <saint@federated.computer> 2024 A.D.
|
||||||
# Gossamer Threads to Discourse -- Migration-Import Script
|
# Gossamer Threads to Discourse -- Migration-Import Script
|
||||||
# v0.48.4 Batch size 1000
|
# v0.48.5 Batch size 1000, double councurrency numbers
|
||||||
|
|
||||||
require 'mysql2'
|
require 'mysql2'
|
||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
@ -37,7 +37,7 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
username: 'admin',
|
username: 'admin',
|
||||||
password: "yxnh93Ybbz2Nm8#mp28zCVv",
|
password: "yxnh93Ybbz2Nm8#mp28zCVv",
|
||||||
host: 'slowtwitch.northend.network',
|
host: 'slowtwitch.northend.network',
|
||||||
pool: 20, # Adjust based on concurrency needs
|
pool: 40, # Adjust based on concurrency needs
|
||||||
timeout: 5000
|
timeout: 5000
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1126,11 +1126,11 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
# Use CachedThreadPool for dynamic thread management
|
# Use CachedThreadPool for dynamic thread management
|
||||||
#### pool = Concurrent::CachedThreadPool.new
|
#### pool = Concurrent::CachedThreadPool.new
|
||||||
###### pool = Concurrent::FixedThreadPool.new(7)
|
###### pool = Concurrent::FixedThreadPool.new(7)
|
||||||
pool = Concurrent::FixedThreadPool.new(12)
|
pool = Concurrent::FixedThreadPool.new(24)
|
||||||
|
|
||||||
# Define the connection pool inside the method
|
# Define the connection pool inside the method
|
||||||
###### mariadb_pool = ConnectionPool.new(size: 14, timeout: 100) do
|
###### mariadb_pool = ConnectionPool.new(size: 14, timeout: 100) do
|
||||||
mariadb_pool = ConnectionPool.new(size: 24, timeout: 100) do
|
mariadb_pool = ConnectionPool.new(size: 48, timeout: 100) do
|
||||||
Mysql2::Client.new(
|
Mysql2::Client.new(
|
||||||
host: "slowtwitch.northend.network",
|
host: "slowtwitch.northend.network",
|
||||||
username: "admin",
|
username: "admin",
|
||||||
|
Loading…
Reference in New Issue
Block a user