add mongo adapter to nodebb importer (#8000)

This commit is contained in:
Mohamad Abras
2019-08-12 21:15:11 +03:00
committed by Robin Ward
parent ca7f1dabbf
commit 6cc9fe42ce
2 changed files with 128 additions and 2 deletions

View File

@ -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",