Compare commits
2 Commits
85e01956f9
...
6b0b8b8c73
Author | SHA1 | Date | |
---|---|---|---|
6b0b8b8c73 | |||
3fcba4d050 |
@ -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.53 Set to 2 threads for PostgreSQL pool size issue and remonitor. Need to consider memory consumption aspects as well of this after OOM.
|
# v0.54 Tweak trust levels
|
||||||
|
|
||||||
require 'mysql2'
|
require 'mysql2'
|
||||||
require 'open-uri'
|
require 'open-uri'
|
||||||
@ -1817,9 +1817,10 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
# Determine the new Trust Level based on post_count
|
# Determine the new Trust Level based on post_count
|
||||||
user = User.find(user_id)
|
user = User.find(user_id)
|
||||||
new_trust_level = case count
|
new_trust_level = case count
|
||||||
when 0..2 then 1 # basic user
|
when 0..29 then 1 # basic user
|
||||||
when 3..50 then 2 # member
|
else 2 # member, regular reserved for now.
|
||||||
else 3 # regular or above when 51..100
|
# when 3..50 then 2 # member
|
||||||
|
# else 3 # regular or above when 51..100
|
||||||
end
|
end
|
||||||
|
|
||||||
# Fetch the current user and check if Trust Level needs updating
|
# Fetch the current user and check if Trust Level needs updating
|
||||||
@ -1989,12 +1990,12 @@ class GossamerForumsImporter < ImportScripts::Base
|
|||||||
# generate_user_id_mapping
|
# generate_user_id_mapping
|
||||||
# export_username_mapping_to_csv("/bitnami/discourse/sqlite/gossamer-migration-username-mapping#{timestamp}")
|
# export_username_mapping_to_csv("/bitnami/discourse/sqlite/gossamer-migration-username-mapping#{timestamp}")
|
||||||
|
|
||||||
## set_user_bio_images
|
set_user_bio_images
|
||||||
|
|
||||||
# import_categories
|
# import_categories
|
||||||
|
|
||||||
####### import_topics_and_posts_with_attachments
|
####### import_topics_and_posts_with_attachments
|
||||||
threaded_topic_import
|
### threaded_topic_import
|
||||||
|
|
||||||
update_topic_stats
|
update_topic_stats
|
||||||
update_user_stats
|
update_user_stats
|
||||||
|
Loading…
Reference in New Issue
Block a user