Subversion Repositories SmartDukaan

Rev

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

Rev 14422 Rev 14423
Line 26... Line 26...
26
        self.source_id = source_id
26
        self.source_id = source_id
27
        self.rank = rank
27
        self.rank = rank
28
        
28
        
29
    
29
    
30
 
30
 
31
def get_mongo_connection(host=options.host, port=27017):
31
def get_mongo_connection(host=options.mongoHost, port=27017):
32
    global con
32
    global con
33
    if con is None:
33
    if con is None:
34
        print "Establishing connection %s host and port %d" %(host,port)
34
        print "Establishing connection %s host and port %d" %(host,port)
35
        try:
35
        try:
36
            con = pymongo.MongoClient(host, port)
36
            con = pymongo.MongoClient(host, port)