diff options
author | gebele <gebele@in-silico.ch> | 2017-05-23 11:18:25 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2017-05-23 11:18:25 +0000 |
commit | ae0ffde118536b14f7fb2fae4766457a077f8e71 (patch) | |
tree | e7a3587aa79982d09483458e5794b7f6cfa3b991 | |
parent | b4a6b825c12b4aab1c661cf653e734291f365c6a (diff) |
refinements
-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 + |