From ae0ffde118536b14f7fb2fae4766457a077f8e71 Mon Sep 17 00:00:00 2001 From: gebele Date: Tue, 23 May 2017 11:18:25 +0000 Subject: refinements --- update_prediction_models.rb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/update_prediction_models.rb b/update_prediction_models.rb index 31baa77..d57cc8f 100644 --- a/update_prediction_models.rb +++ b/update_prediction_models.rb @@ -2,10 +2,20 @@ ENV["LAZAR_ENV"] = "production" require_relative '../lazar/lib/lazar' #require 'lazar' include OpenTox + +# use mongodb how it is configured by lazar lib +#=begin $mongo.database.drop $gridfs = $mongo.database.fs # recreate GridFS indexes +`mongorestore --host #{ CENTRAL_MONGO_IP.blank? ? "127.0.0.1" : CENTRAL_MONGO_IP}` +#=end -# uncomment to load in particular to local mongodb -#mongorestore --host 127.0.0.1 -`mongorestore --host #{ CENTRAL_MONGO_IP.blank? ? "127.0.0.1" : CENTRAL_MONGO_IP}` +# overwrite lazar congif to load in particular to localhost mongodb +=begin +$mongo = Mongo::Client.new("mongodb://127.0.0.1:27017/#{ENV['LAZAR_ENV']}") +$mongo.database.drop +$gridfs = $mongo.database.fs # recreate GridFS indexes +`mongorestore --host 127.0.0.1` +=end + -- cgit v1.2.3