v0.42.1 Rewrite and simplication of concurrent-ruby support
This commit is contained in:
parent
b7fcb220c9
commit
d8633b5b6c
@ -1161,16 +1161,17 @@ class GossamerForumsImporter < ImportScripts::Base
|
||||
#### current_post_batch += 1 # Increment, moving to next post in the batch
|
||||
#### break if current_post_batch >= parent_post_count
|
||||
|
||||
# Check if all posts have been processed
|
||||
#### is_complete = true if current_post_batch >= parent_post_count
|
||||
is_complete = parent_post_ids.empty?
|
||||
end
|
||||
|
||||
# Wait for all jobs in the current batch to finish before proceeding
|
||||
puts "PP 33 -- Ready for shutdown"
|
||||
pool.shutdown # Initiate thread pool shutdown after all jobs submitted
|
||||
puts "PP 44 -- Now wait for termination"
|
||||
pool.wait_for_termination # Wait for all threads to finish exec
|
||||
|
||||
# Check if all posts have been processed
|
||||
#### is_complete = true if current_post_batch >= parent_post_count
|
||||
is_complete = parent_post_ids.empty?
|
||||
end
|
||||
end
|
||||
|
||||
# # Method to ensure thread-safe updates to highest_processed_post_id
|
||||
|
Loading…
Reference in New Issue
Block a user