v0.48.4 Batch size 1000

This commit is contained in:
David Sainty 2024-08-19 12:13:27 +10:00
parent e0fd933526
commit 74d2ee7382

View File

@ -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.3 Further attempts to address MariaDB challenges and make things as foolproof as possible. # v0.48.4 Batch size 1000
require 'mysql2' require 'mysql2'
require 'open-uri' require 'open-uri'
@ -1148,7 +1148,7 @@ class GossamerForumsImporter < ImportScripts::Base
parent_post_ids = result.map { |row| row['post_id'] } parent_post_ids = result.map { |row| row['post_id'] }
# parent_post_count = parent_post_ids.count # parent_post_count = parent_post_ids.count
batch_size = 10 # Set our batch size for number of posts to import in a single batch batch_size = 1000 # Set our batch size for number of posts to import in a single batch
#### current_post_batch = 0 # Set our current batch number. This tracks the current batch of posts being processed. #### current_post_batch = 0 # Set our current batch number. This tracks the current batch of posts being processed.