Subversion Repositories SmartDukaan

Rev

Rev 26572 | Rev 26750 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26572 Rev 26576
Line 35... Line 35...
35
(options, args) = parser.parse_args()
35
(options, args) = parser.parse_args()
36
 
36
 
37
con=None
37
con=None
38
 
38
 
39
DataService.initialize(db_hostname=options.dbHost)
39
DataService.initialize(db_hostname=options.dbHost)
40
solr = pysolr.Solr(options.solrPath, timeout=10)
40
solr = pysolr.Solr(options.solrPath, always_commit=True, timeout=10)
41
 
41
 
42
def get_mongo_connection(host='localhost', port=27017):
42
def get_mongo_connection(host='localhost', port=27017):
43
    global con
43
    global con
44
    if con is None:
44
    if con is None:
45
        print "Establishing connection %s host and port %d" %(host,port)
45
        print "Establishing connection %s host and port %d" %(host,port)