Example #1
0
 def __init__(self, host='localhost',port=27017):
     Mongo_Connector.__init__(self, host, port)
     self._database = self._connection['sessiontoken']
     self._token_collection = self._database['token']
     self._token_collection.ensure_index([('tokenid',1)],unique=True)
     self._token_collection.ensure_index([('username',1)])
     self._token_collection.ensure_index([('created_time',1)], expireAfterSeconds=EXPIRED_SESSION_TIME)
Example #2
0
 def __init__(self, host="localhost", port=27017):
     Mongo_Connector.__init__(self, host, port)
     self._database = self._connection["logTopUp"]
     self._nganluong_collection = self._database["nganluong"]
     self._error_collection = self._database["error"]
     self._nganluong_collection.ensure_index([("ref_code", 1)], unique=True)
     self._error_collection.ensure_index([("ref_code", 1)], unique=True)
Example #3
0
 def __init__(self, host='localhost',port=27017):
     Mongo_Connector.__init__(self, host, port)
     #Mongo_UserInfo_Connector.__init__(self, host, port)
     self._database = self._connection['guest']
     self._userinfo_collection = self._database['userinfo']
     self._userinfo_collection.ensure_index([('username',1)],unique=True)
     """TODO"""
     self._userinfo_collection.ensure_index([('money_last_update',1)],expireAfterSeconds=GUEST_ACCOUNT_EXPIRED_TIME)
Example #4
0
 def __init__(self, host='localhost',port=27017):
     Mongo_Connector.__init__(self, host, port)
     self._database = self._connection['guest']
     self._auth_collection = self._database['authentication']
     self._auth_collection.ensure_index([('username',1)],unique=True)
     self._auth_collection.ensure_index([('created_time',1)],expireAfterSeconds=GUEST_ACCOUNT_EXPIRED_TIME)