コード例 #1
0
ファイル: pipelines.py プロジェクト: xuyang06/noveldeal
 def __init__(self):
     client = pymongo.MongoClient(settings['MONGODB_SERVER'],
                                  settings['MONGODB_PORT'])
     db = client[settings['MONGODB_DB']]
     self.collection = db[settings['MONGODB_COLLECTION']]
     self.collection.drop()
     #self.kafka = KafkaClient('localhost:9092')
     #self.topic_consumer_dict = {}
     self.sender = Sender()