def __init__(self):
     self.redis_client = config.redis_client
     self.collection = mongodb_service.get_collection(
         config.mongodb, self.TABLE_NAME)
     self.collection.create_index([('ip', pymongo.ASCENDING)],
                                  unique=True,
                                  sparse=True)
Esempio n. 2
0
 def __init__(self):
     super(DesignPictureService, self).__init__()
     self.summary_collection = mongodb_service.get_collection(
         config.mongodb, self.TABLE_NAME_SUMMARY)
Esempio n. 3
0
 def __init__(self):
     self.collection = mongodb_service.get_collection(
         config.mongodb, self.TABLE_NAME)
     self.redis_bloom_filter = RedisBloomFilter(redis_client)