mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
add mongo adapter to nodebb importer (#8000)
This commit is contained in:

committed by
Robin Ward

parent
ca7f1dabbf
commit
6cc9fe42ce
@ -1,7 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative '../base.rb'
|
||||
require_relative '../base'
|
||||
require_relative './redis'
|
||||
require_relative './mongo'
|
||||
|
||||
class ImportScripts::NodeBB < ImportScripts::Base
|
||||
# CHANGE THESE BEFORE RUNNING THE IMPORTER
|
||||
@ -12,8 +13,10 @@ class ImportScripts::NodeBB < ImportScripts::Base
|
||||
def initialize
|
||||
super
|
||||
|
||||
adapter = NodeBB::Redis
|
||||
# adapter = NodeBB::Mongo
|
||||
# @client = adapter.new('mongodb://127.0.0.1:27017/nodebb')
|
||||
|
||||
adapter = NodeBB::Redis
|
||||
@client = adapter.new(
|
||||
host: "localhost",
|
||||
port: "6379",
|
||||
|
Reference in New Issue
Block a user