v0.57 Improve personal message handling and add commented line for doing specified blocks of PMs.
This commit is contained in:
parent
09a18ea6f1
commit
a61fa8a725
@ -1860,7 +1860,8 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
# # # highest_processed_personal_id = 1543840
|
# # # highest_processed_personal_id = 1543840
|
||||||
puts "Highest processed personal_id override: #{highest_processed_personal_id}"
|
puts "Highest processed personal_id override: #{highest_processed_personal_id}"
|
||||||
|
|
||||||
execute_query("SELECT * FROM gforum_Message").each do |row|
|
## execute_query("SELECT * FROM gforum_Message").each do |row|
|
||||||
|
execute_query("SELECT * FROM gforum_Message WHERE msg_id > #{highest_processed_personal_id}").each do |row|
|
||||||
begin
|
begin
|
||||||
msg_id = row['msg_id'].to_i
|
msg_id = row['msg_id'].to_i
|
||||||
puts "msg_id #{msg_id}"
|
puts "msg_id #{msg_id}"
|
||||||
@ -1868,7 +1869,7 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
# Skip posts that have already been processed
|
# Skip posts that have already been processed
|
||||||
# OVERRIDE - upper limit msg
|
# OVERRIDE - upper limit msg
|
||||||
# # # next if msg_id <= highest_processed_personal_id || msg_id > 342443
|
# # # next if msg_id <= highest_processed_personal_id || msg_id > 342443
|
||||||
next if msg_id <= highest_processed_personal_id
|
## next if msg_id <= highest_processed_personal_id
|
||||||
|
|
||||||
from_user_id = fetch_user_id_mapping(row['from_user_id_fk'])
|
from_user_id = fetch_user_id_mapping(row['from_user_id_fk'])
|
||||||
to_user_id = fetch_user_id_mapping(row['to_user_id_fk'])
|
to_user_id = fetch_user_id_mapping(row['to_user_id_fk'])
|
||||||
@ -2035,8 +2036,8 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
# export_url_mapping_to_csv("/bitnami/discourse/sqlite/gossamer-migration-url-mapping#{timestamp}")
|
# export_url_mapping_to_csv("/bitnami/discourse/sqlite/gossamer-migration-url-mapping#{timestamp}")
|
||||||
# export_nginx_rewrite_rules("/bitnami/discourse/sqlite/gossamer-redirects#{timestamp}.conf")
|
# export_nginx_rewrite_rules("/bitnami/discourse/sqlite/gossamer-redirects#{timestamp}.conf")
|
||||||
|
|
||||||
update_existing_personal_message_activity
|
# update_existing_personal_message_activity
|
||||||
# import_personal_messages
|
import_personal_messages
|
||||||
|
|
||||||
puts "Gossamer Forums import complete! #{timestamp}"
|
puts "Gossamer Forums import complete! #{timestamp}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user