From 3fcba4d050941dde5f24599c2790d818d74e692d Mon Sep 17 00:00:00 2001 From: saint Date: Tue, 27 Aug 2024 08:21:12 +1000 Subject: [PATCH] v0.54 Tweak trust levels --- gossamer_forums.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 17e3d4c..21cf23b 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1,7 +1,7 @@ # Federated Computer, Inc. # David Sainty 2024 A.D. # 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 'open-uri' @@ -1817,9 +1817,10 @@ class GossamerForumsImporter < ImportScripts::Base # Determine the new Trust Level based on post_count user = User.find(user_id) new_trust_level = case count - when 0..2 then 1 # basic user - when 3..50 then 2 # member - else 3 # regular or above when 51..100 + when 0..29 then 1 # basic user + else 2 # member, regular reserved for now. +# when 3..50 then 2 # member +# else 3 # regular or above when 51..100 end # Fetch the current user and check if Trust Level needs updating