diff options
-rw-r--r-- | update_prediction_models.rb | 16 |
1 files 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 + |