summaryrefslogtreecommitdiff
path: root/update_prediction_models.rb
blob: 01e582765e1a5157507131b7b2cdf3f9d52868ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
PhysChem.descriptors # ensure descriptors are loaded
`mongorestore --host #{ CENTRAL_MONGO_IP.blank? ? "127.0.0.1" : CENTRAL_MONGO_IP}`
#=end


# 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