Improve goss-restorethread.rb to allow for restoring a given Gossamer Forums Forum Post / OP post_id

This commit is contained in:
David Sainty 2024-12-07 00:15:16 +11:00
parent 79d9d44a3e
commit 204cf1788b

View File

@ -2175,6 +2175,7 @@ class GossamerForumsImporter < ImportScripts::Base
# Main method to perform the import # Main method to perform the import
def perform_import(restore_forumpost_id) def perform_import(restore_forumpost_id)
# Secret trick to disable RateLimiting protection in Discourse # Secret trick to disable RateLimiting protection in Discourse
puts "CCC"
RateLimiter.disable RateLimiter.disable
# ActiveRecord::Base.connection.disconnect! rescue nil # ActiveRecord::Base.connection.disconnect! rescue nil
@ -2241,6 +2242,6 @@ if ARGV.length != 1
end end
restore_forumpost_id = ARGV[0] restore_forumpost_id = ARGV[0]
puts "BBB"
GossamerForumsImporter.new.perform_import(restore_forumpost_id) GossamerForumsImporter.new.perform_import(restore_forumpost_id)