v0.22.3 Add debug output for attachment processing

This commit is contained in:
David Sainty 2024-07-01 16:30:44 +10:00
parent 80b62b018e
commit efb56dba7e

View File

@ -1,5 +1,5 @@
# gossamer threads migration-import code # gossamer threads migration-import code
# v0.22.2 # v0.22.3
require 'mysql2' require 'mysql2'
require 'open-uri' require 'open-uri'
@ -799,9 +799,9 @@ class GossamerForumsImporter < ImportScripts::Base
post_id = row['post_id'].to_i post_id = row['post_id'].to_i
# Skip posts that have already been processed # Skip posts that have already been processed
# FIX THIS PROPERLY FOR FUTURE RUNS # FIXED PROPERLY FOR FUTURE RUNS
next if post_id < highest_old_post_id # next if post_id < highest_old_post_id
# next if post_id <= highest_processed_post_id next if post_id <= highest_processed_post_id
puts "Processing post_id #{row['post_id']} post_id #{row['post_root_id']} post_subject/title #{row['post_subject']} forum_id_fk/category_id #{row['forum_id_fk']}" puts "Processing post_id #{row['post_id']} post_id #{row['post_root_id']} post_subject/title #{row['post_subject']} forum_id_fk/category_id #{row['forum_id_fk']}"
# discourse_user_id = @user_id_map[row['user_id_fk']] # discourse_user_id = @user_id_map[row['user_id_fk']]
@ -1030,7 +1030,7 @@ class GossamerForumsImporter < ImportScripts::Base
user = User.find(user_id) user = User.find(user_id)
user.update!(post_count: count) user.update!(post_count: count)
end end
end
# Import personal messages from gforum_Message table (both inbox and sent messages) # Import personal messages from gforum_Message table (both inbox and sent messages)